-
-
Notifications
You must be signed in to change notification settings - Fork 1.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
Invalid hook call when executing with @vitest-ui
#3861
Comments
Can you try downgrading |
I am facing the same issue, but I actually can get it working with the latest vitest version; issue seems to be actually related to the latest happy-dom version for me. |
Downgrading works as a workaround. Seems to be related to latest version of either |
Error also occurs using:
... which impacts testing UIs such as the vscode vitest extension. Downgrading |
@SamuelAlev i love u |
Thank you, @SamuelAlev the downgrading worked here 👋 |
Another workaround for now. Add this to your config to disable occasional optimizer. Looks like there is a bug in the implementation that causes inconsistencies when deps: {
optimizer: {
web: {
enabled: false,
},
},
}, |
Describe the bug
Executing tests with UI will lead to invalid hook calls (
TypeError: Cannot read properties of null (reading 'useState')
). Executing tests without UI will pass.Reproduction
npm run test-ui
(will executevitest
withui
flag)System Info
Used Package Manager
npm
Validations
The text was updated successfully, but these errors were encountered: