Skip to content
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

TypeError: Cannot read properties of null (reading 'useState') #4000

Closed
6 tasks done
PCosta1990 opened this issue Aug 22, 2023 · 2 comments
Closed
6 tasks done

TypeError: Cannot read properties of null (reading 'useState') #4000

PCosta1990 opened this issue Aug 22, 2023 · 2 comments

Comments

@PCosta1990
Copy link

Describe the bug

Hi, I am trying do a testing in vitest and @testing-library/react, when i try do me a error TypeError: Cannot read properties of null (reading 'useState'). After I went to vitest and try the react-testing-lib in demo and it do a same problem.

Reproduction

https://stackblitz.com/edit/vitest-dev-vitest-ff6sbs?file=src%2FApp.test.tsx&initialPath=__vitest__/

System Info

System:
    OS: Windows 10 10.0.19045
    CPU: (12) x64 AMD Ryzen 5 4600G with Radeon Graphics
    Memory: 933.92 MB / 7.38 GB
  Binaries:
    Node: 18.14.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.19 - ~\AppData\Roaming\npm\yarn.CMD
    npm: 9.4.2 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: Spartan (44.19041.1266.0), Chromium (115.0.1901.203)
    Internet Explorer: 11.0.19041.1566

Used Package Manager

yarn

Validations

@stackblitz
Copy link

stackblitz bot commented Aug 22, 2023

Fix this issue in StackBlitz Codeflow Start a new pull request in StackBlitz Codeflow.

@sheremet-va
Copy link
Member

Fixed in #3992

@github-actions github-actions bot locked and limited conversation to collaborators Sep 6, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants