Skip to content

Since v0.34.2 "Download the React DevTools" message displayed in every test #4107

@anthonyblond

Description

@anthonyblond

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.2

Used Package Manager

yarn

Validations

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions