You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am unable to test with nuqs without mocking in NextJS and Jest. NextJS has its own code transformer and Jest config wrapper, so it is difficult to follow the Nuqs/Jest guide and use experimental ESM support. Instead, I've been relying on NextJS config transpilePackages option to port the node packages back to CommonJS.
However, with the esm-only.cjs file, I'll get an exception in my tests. But even if I remove the manual exception, my test still cannot find the correct module. I suspect maybe #880 might fix this, but with the NextJS Jest wrapper over Jest config, it didn't work :(
Really want to not mock and wish jest supports ESM out of the box :( but meanwhile, are there any workarounds?
Context
What's your version of
nuqs
?What framework are you using?
Which version of your framework are you using?
Description
I am unable to test with nuqs without mocking in NextJS and Jest. NextJS has its own code transformer and Jest config wrapper, so it is difficult to follow the Nuqs/Jest guide and use experimental ESM support. Instead, I've been relying on NextJS config transpilePackages option to port the node packages back to CommonJS.
However, with the
esm-only.cjs
file, I'll get an exception in my tests. But even if I remove the manual exception, my test still cannot find the correct module. I suspect maybe #880 might fix this, but with the NextJS Jest wrapper over Jest config, it didn't work :(Really want to not mock and wish jest supports ESM out of the box :( but meanwhile, are there any workarounds?
Reproduction
The text was updated successfully, but these errors were encountered: