Open TomerAberbach opened 10 months ago
~Could you give me a small example of test.prop
being used? I've never used fast-check
and can't find anything about test.prop
or testProp
so it's hard to triage this 😅~
nw found it: https://fast-check.dev/docs/ecosystem/#fast-checkjest-
Ah sorry, thanks for looking! That is indeed right 👍
I'm somewhat reserved these days on adding support for this kind of thing because we've got to draw the line in how far we go to support non-jest variations of stuff somewhere but that isn't an outright no.
One thing that comes to mind is globalAliases
, but part of the challenge is you're not providing a direct replacement for jest
which exposes us to that variation problem: we'd need to be expressing "this is like it.each
, but it doesn't otherwise act like it
"...
I'll sit on this for a bit and play around with our existing logic when I have a chance to see if it could fit naturally in.
See https://github.com/dubzzz/fast-check/issues/4474
fast-check
exposes atest.prop
function that's invoked similarly to Jest's built-intest.each
. However, it doesn't seem likeexpect-expect
andno-standalone-expect
'sadditionalTestBlockFunctions
option supportstest.each
-like function. Probably because the test lambda is passed to an anonymous function instead oftest.prop
itself (i.e.test.prop(args)(theTestLambda)
)Would it be possible to support
test.each
-like functions?