-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Description
Describe the bug
Note sure if this is a bug exactly, but it does not seem intention. Happy to move this to a discussion instead though.
After upgrading to v0.34.2 (from v0.34.1), every test file is generating is causing the following output:
stdout | unknown test
Download the React DevTools for a better development experience: https://reactjs.org/link/react-devtools
This seems to be to related to this issue with React 18: facebook/react#24283 However for me its fine in browser, only an issue in the tests.
I found that it is specific to the happy-dom environment. Changing to jsdom prevents it from being displayed. I suspect it is something to do with passing environment options to happy-dom, a change mentioned in the release notes for 0.34.2.
Reproduction
React 18
[email protected]
[email protected]
[email protected] (downgrading this made no difference for me)
@testing-library/[email protected]
@testing-library/[email protected]
@testing-library/[email protected]
@vitejs/[email protected]
Running any test of a react component trigger it.
Its not for every test, just for every time. Hence the "stdout | unknown test" part I assume.
System Info
System:
OS: Linux 5.4 Ubuntu 20.04.6 LTS (Focal Fossa)
CPU: (12) x64 Intel(R) Core(TM) i7-5820K CPU @ 3.30GHz
Memory: 16.30 GB / 31.26 GB
Container: Yes
Shell: 5.0.17 - /bin/bash
Binaries:
Node: 18.17.0 - ~/.nvm/versions/node/v18.17.0/bin/node
Yarn: 1.22.19 - ~/.yarn/bin/yarn
npm: 9.6.7 - ~/.nvm/versions/node/v18.17.0/bin/npm
pnpm: 8.6.12 - ~/.local/share/pnpm/pnpm
Watchman: 4.9.0 - /usr/bin/watchman
Browsers:
Chrome: 116.0.5845.140
npmPackages:
@vitejs/plugin-basic-ssl: ^1.0.1 => 1.0.1
@vitejs/plugin-react: ^4.0.3 => 4.0.4
@vitest/coverage-v8: ^0.33.0 => 0.33.0
vite: ^4.4.5 => 4.4.9
vitest: 0.34.2 => 0.34.2Used Package Manager
yarn
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.