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

[expect-expect and no-standalone-expect] additionalTestBlockFunctions does not recognize test.each-like functions #1475

Open
TomerAberbach opened this issue Dec 2, 2023 · 3 comments

Comments

@TomerAberbach
Copy link

See dubzzz/fast-check#4474

fast-check exposes a test.prop function that's invoked similarly to Jest's built-in test.each. However, it doesn't seem like expect-expect and no-standalone-expect's additionalTestBlockFunctions option supports test.each-like function. Probably because the test lambda is passed to an anonymous function instead of test.prop itself (i.e. test.prop(args)(theTestLambda))

Would it be possible to support test.each-like functions?

@G-Rath
Copy link
Collaborator

G-Rath commented Dec 2, 2023

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-

@TomerAberbach
Copy link
Author

Ah sorry, thanks for looking! That is indeed right 👍

@G-Rath
Copy link
Collaborator

G-Rath commented Dec 2, 2023

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.

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

2 participants