-
Notifications
You must be signed in to change notification settings - Fork 0
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
Convert to ESM #78
Comments
Ok migrating to ESM will hit a problem with the way fastcheck is currently used. See: dubzzz/fast-check#4986 (comment) It's when fastcheck is integrated with jest that's when there's a problem. @amydevs had done something before to as a hack here. It has something to do with:
|
To make this work, we have a few options:
The core of the problem is that jest mocking is not hoisted above ESM module imports, unlike CJS imports, and moving to ESM means that mocking won't really work. |
I think solution 1. could be achieved by writing our own fast check jest integration. It's a pretty simple package: https://github.com/dubzzz/fast-check/tree/main/packages/jest. It would be a simple utility package, rather than something large, so we wouldn't bother with even testing it. |
This package should be possible to convert to ESM, all its dependencies are already ESM.
Tasks
The text was updated successfully, but these errors were encountered: