Open
Description
What are thoughts on adding something like this this?
forAll :: ∀ e a f. Foldable f => (a -> String) -> String -> f a -> (a -> Aff e Unit) -> Spec e Unit
forAll itTitle title arb f = describe title do
for_ arb \a -> it (itTitle a) (f a)
...
forAll _.str "format (unformat a) = a" arb \({ str }) -> do
(format $ unformat str) `shouldEqual` (Right str)
...
I have been using for_
in it
block but if some test case fails then other items are not tested and you can't see them in log. using this function you can see each item in log and all of them will be executed.
Metadata
Metadata
Assignees
Labels
No labels