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

✨(jest) Take seed coming from Jest whenever provided #3332

Merged
merged 3 commits into from Oct 19, 2022
Merged

Conversation

dubzzz
Copy link
Owner

@dubzzz dubzzz commented Oct 19, 2022

Fixes #3287

Category:

  • ✨ Introduce new features
  • 📝 Add or update documentation
  • ✅ Add or update tests
  • 🐛 Fix a bug
  • 🏷️ Add or update types
  • ⚡️ Improve performance
  • Other(s): ...

Potential impacts:

  • Generated values
  • Shrink values
  • Performance
  • Typings
  • Other(s): ...

@codesandbox-ci
Copy link

codesandbox-ci bot commented Oct 19, 2022

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 041f675:

Sandbox Source
Vanilla Configuration
@fast-check/examples Configuration

@codecov
Copy link

codecov bot commented Oct 19, 2022

Codecov Report

Merging #3332 (ff71782) into main (93fb06a) will decrease coverage by 0.03%.
The diff coverage is n/a.

❗ Current head ff71782 differs from pull request most recent head 041f675. Consider uploading reports for the commit 041f675 to get more accurate results

@@            Coverage Diff             @@
##             main    #3332      +/-   ##
==========================================
- Coverage   95.50%   95.47%   -0.04%     
==========================================
  Files         212      212              
  Lines        5829     5829              
  Branches     1075     1075              
==========================================
- Hits         5567     5565       -2     
- Misses        262      264       +2     
Flag Coverage Δ
unit-tests 95.47% <ø> (-0.04%) ⬇️
unit-tests-14.x-Linux ?
unit-tests-16.x-Linux 95.47% <ø> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
packages/fast-check/src/arbitrary/unicode.ts 94.44% <0.00%> (-5.56%) ⬇️
packages/fast-check/src/arbitrary/double.ts 97.50% <0.00%> (-2.50%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@dubzzz dubzzz merged commit 94c4d30 into main Oct 19, 2022
@dubzzz dubzzz deleted the jest-seed branch October 19, 2022 19:53
@SimenB
Copy link
Contributor

SimenB commented Oct 19, 2022

Would it make sense to ask people to pass --show-seed or add it to their config? Should this module stop printing the seed in its own?

Might be breaking changes, but I'd be very interested to hear your thoughts (as it might mean changes to Jest would still be useful if there are blockers) 🙂 If the answer is "next major" that's understandable as well 👍

@dubzzz
Copy link
Owner Author

dubzzz commented Oct 19, 2022

I added a small section recommending to add --show-seed into the Readme file. Concerning "not printing the seed via this library", it's definitely part of the plan. But as it would be a breaking I'll wait a bit before doing it.

@SimenB
Copy link
Contributor

SimenB commented Oct 19, 2022

Cool 👍 Nothing missing in Jest (as of now, regarding this feature)?

@dubzzz
Copy link
Owner Author

dubzzz commented Oct 19, 2022

For now everything looks perfect ☺️

@SimenB
Copy link
Contributor

SimenB commented Oct 19, 2022

🚀

@dubzzz
Copy link
Owner Author

dubzzz commented Oct 20, 2022

I just launched a release for @fast-check/jest

@dubzzz
Copy link
Owner Author

dubzzz commented Oct 21, 2022

Version successfully released, see @fast-check/jest version 1.3.0.

thewilkybarkid added a commit to PREreview/prereview.org that referenced this pull request Oct 26, 2022
Jest 29.2 added an option to set a seed, which fast-check uses, and to show it. In the event of a failure, we can rerun the tests with the same seed, making debugging non-deterministic failures far simpler.

I'm not sure why Dependabot isn't updating Jest/ts-jest to v29.

Refs #388, a6b0f11, jestjs/jest#13400, dubzzz/fast-check#3332
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

Successfully merging this pull request may close these issues.

Prepare @fast-check/jest to seeded jest
2 participants