Popularity
3.1
Stable
Activity
2.4
-
2
4
0
Monthly Downloads: 24
Programming language: Makefile
License: BSD 3-clause "New" or "Revised" License
Latest version: v0.0.4
hspec-leancheck alternatives and similar packages
Based on the "hspec" category.
Alternatively, view hspec-leancheck alternatives based on common mentions on social networks and blogs.
CodeRabbit: AI Code Reviews for Developers
Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.
Promo
coderabbit.ai

Do you think we are missing an alternative of hspec-leancheck or a related project?
README
hspec-leancheck: LeanCheck support for Hspec
LeanCheck support for the Hspec test framework.
Installing
$ cabal install hspec-leancheck
Example
Here's how your spec.hs
might look like:
import Test.Hspec
import Test.Hspec.LeanCheck as LC
import Data.List (sort)
main :: IO ()
main = hspec spec
spec :: Spec
spec = do
describe "sort" $ do
it "is idempotent" $
LC.property $ \xs -> sort (sort xs :: [Int]) == sort xs
it "is identity" $ -- not really
LC.property $ \xs -> sort (xs :: [Int]) == xs
And here is the output for the above program:
$ ./eg/minimal
sort
is idempotent
is identity FAILED [1]
Failures:
eg/minimal.hs:17:5:
1) sort is identity
[1,0]
To rerun use: --match "/sort/is identity/"
Randomized with seed 44182769
Finished in 0.0008 seconds
2 examples, 1 failure
Options
Use propertyWith
to configure the number of tests.