-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
bug: viem 1.15.5 and above (isows) breaks jest #1329
Comments
Jest has pretty poor support for CJS + ESM interop at the moment. I think they have plans to make this better. I'd consider your workaround fine. I'd highly recommend a migration to Vitest though. It's relatively straight forward, and worth it. |
|
You don't need to mock it. The provided |
This issue has been locked since it has been closed for more than 14 days. If you found a concrete bug or regression related to it, please open a new bug report with a reproduction against the latest Viem version. If you have any questions or comments you can create a new discussion thread. |
Is there an existing issue for this?
Package Version
1.15.5
Current Behavior
Hi, since
viem
switched toisows
as part of1.15.5
jest is unable to handle anything insideviem
.This is likely an upstream issue that needs to be solved in
isows
.Error:
We're running jest the recommended way by NextJS which does not transform
node_modules
.If I add the following to my
jest.config.mjs
it works:Expected Behavior
Jest is able to use
viem
utils as part of the components it tests.Steps To Reproduce
A reproduction would be a bit time consuming to set up. If desired, I can do so.
Link to Minimal Reproducible Example (StackBlitz, CodeSandbox, GitHub repo etc.)
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: