-
-
Notifications
You must be signed in to change notification settings - Fork 135
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
Vitest storybook tests erroring since 1.13.2 #454
Comments
Thanks for the report. The only change between 1.13.1 and 1.13.2 concerns the pages router, but you mention using the app router. Could you fill up the context section of the issue template please, so I can try and reproduce? Including your storybook/vitest setup would also be very useful, thanks. This "router is undefined" error (ignore the rate-limit message, that is a try-catch being placed too wide) could indicate that Storybook doesn't run in a Next.js context, which is needed for |
Sure, will get a repro |
@franky47 Added repro steps. I am using a custom mock router to get this to work, so the thing is that just that the error above throws in tests. I could try ignoring the error, but issue still stands that it'll cause my tests to fail in 1.13.2 but not 1.13.1 |
🎉 This issue has been resolved in version 1.15.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Thanks to your reproduction, I found the issue: Let me know if 1.15.2 works for you. |
Yup, it works. Thanks @franky47 |
Context
What's your version of
nuqs
?1.13.2
Next.js information (obtained by running
next info
):Are you using:
basePath
option in your Next.js configwindowHistorySupport
flag in your Next.js configDescription
Ever since I upgraded to nuqs 1.13.2, I get the following error in my vitest tests that use nuqs through Storybook.
1.13.1 works perfectly fine
Reproduction
npm install
->npm run test
The relevant test is
nuqs-demo.test.tsx
Notice that the error above throws.
If I downgrade to 1.13.1, it doesn't throw.
The text was updated successfully, but these errors were encountered: