|
Hello, I've encountered some errors testing with Jest. I've followed the testing docs as outlined: render(
<Suspense fallback={<div>Loading...</div>}>
<Tabs />
</Suspense>,
{
wrapper: withNuqsTestingAdapter({ searchParams: '' }),
},
);There is a reusable hook within |
Answered by
franky47
Feb 17, 2025
Replies: 1 comment 2 replies
|
Did you follow the Jest-specific guidelines in the docs? https://nuqs.47ng.com/docs/testing#jest-and-esm |
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you're unable to configure Jest for ESM support, I don't think you'll be able to use Jest to test nuqs then, sorry. Even with the newer versions of Node.js that allow running ESM code in CJS, there will likely be issues with the way Jest loads modules to be able to mock them.