Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't run effectful tests #102

Open
shmish111 opened this issue Jun 28, 2019 · 1 comment
Open

Can't run effectful tests #102

shmish111 opened this issue Jun 28, 2019 · 1 comment
Labels
status: needs more info This issue needs more info before any action can be done.

Comments

@shmish111
Copy link

I have a case that I think is quite legitimate where I want to quickcheck an effectful function however I can't because https://github.com/purescript/purescript-quickcheck/blob/v5.0.0/src/Test/QuickCheck.purs#L97 uses the concrete Gen monad.

My usecase is testing Blockly code2blockly and blockly2code functions. Since Blockly is a very mutable javascript library, both code2blockly and blockly2code have Effect types. In order to test my implementation of these functions I can take some code and basically run code2blockly followed by blockly2code and I should get the original code back. Currently I'm doing this with unsafePerformEffect 😱 but since tests are actually Effects I don't think this is really necessary.

@mikesol
Copy link

mikesol commented Jun 16, 2020

Hi! I just wanted to check in to see if there were any recommendations for effectful testing? I was trying to port a Haskell program that uses monadicIO and ran into this. If there is a coommon workaround, I'd love to know. Thanks!

@JordanMartinez JordanMartinez added the status: needs more info This issue needs more info before any action can be done. label Dec 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: needs more info This issue needs more info before any action can be done.
Projects
None yet
Development

No branches or pull requests

3 participants