-
-
Notifications
You must be signed in to change notification settings - Fork 182
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
Jest Fast Check doesn't allow zero arbitraries #3227
Comments
Actually I just realised this is the case for |
Was confused because the |
Actually not passing any arbitrary to the property (or empty array case in Indeed in order to be efficient property based tests need not only to generate random entries but also to generate them the right way (in a seeded way). More precisely anything dealing with non-deterministic stuff close to random has to be handled via an arbitrary either home made, derived from existing (through In a nutshell: the random part of the random generator has to be done within an arbitrary, otherwise relying on a simple loop is the same. |
Side note: neither |
Hmm the only issue is that webcrypto API doesn't provide any seeding capability for their CSPRNG... |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
🐛 Bug Report
I wrote a test like this:
It ends up throwing this:
But if I give it 1 arbitrary, then it works like:
It appears that the jest fast check doesn't work when there are no arbitraries to use.
Why do I want this? Well because I just want it to run multiple times and allow me to generate random things within the predicate itself.
To Reproduce
Try it in a jest test runner.
Expected behavior
That it should work with no arbitraries... in fact it would be great if it didn't require the
[]
at all and just take the async function directly.Your environment
*Only for TypeScript's users
The text was updated successfully, but these errors were encountered: