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

Suggestions: Return if test has succeded or failed (possibly why it has failed) #128

Open
dschrempf opened this issue Jul 24, 2021 · 0 comments

Comments

@dschrempf
Copy link

dschrempf commented Jul 24, 2021

I use HSpec as a testing framework and it is difficult to know during automatic tests when a law check has failed. I suggest that the function lawsCheck gets a type:

lawsCheck :: Laws -> IO Bool

or something more elaborate if there is need.

EDIT:
For what it's worth, I am using the following function now:

lawsCheckSpec :: Laws -> Spec
lawsCheckSpec (Laws className properties) =
  parallel $
  describe className $
    mapM_ (\(name, p) -> it name (property p)) properties
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant