Comments (2)
Hi @eps1lon, thanks for answering!
In the end it was because pnpm didn't clean the packages well... Just had to remove all the node_modules
for it to work.
So if people encounter that issue, this should help!
Have a nice day 🌞
from react-testing-library.
I suggest you file this against Vitest first. I'm not familiar with the inner workings of this test runner so I can't tell where the issue is.
Especially
Module node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-test-utils.development.js:12 seems to be an ES Module but shipped in a CommonJS package. You might want to create an issue to the package "react-dom" asking them to ship the file in .mjs extension or add "type": "module" in their package.json.
seems odd since that file is definitely a CommonJS package.
There a re probably also existing examples on how to use Vitest and React Testing Library so you should take a look at those and then slowly reduce differences until you can no longer reproduce the issue.
from react-testing-library.
Related Issues (20)
- calling rerender causes remounting HOT 4
- ByRole have inconsistent results (getting h2 instead of button)
- ReactElement not assignable HOT 3
- Property 'toBeInTheDocument' does not exist on type 'JestMatchers<HTMLElement>' HOT 9
- queries returned by render are not scoped HOT 4
- Render function's typescript type excludes valid react component types
- Types are breaking HOT 12
- findBy* query fails but waitFor passes HOT 2
- Intial props not working when rendering a hook (or I've done something wrong.) HOT 5
- Snackbar not auto closing HOT 2
- Test results and "screen.debug" do not match
- Unexpected element not found when adding accessibilityElementsHidden or importantForAccessibility HOT 2
- use rerender props in wrapper HOT 1
- Linting fails as "react-test-renderer" functions are interpreted as functions from "testing-library/react" HOT 2
- Calling render on a component that throws, results in 4 renders HOT 1
- React Testing library `unmount` is not working HOT 1
- Spurious `not wrapped in act` warnings from user-event, react, dom mismatch HOT 4
- Support for `onCaughtError` and `onUncaughtError` on root HOT 3
- Module parse failed: Unexpected token for the act-compat.js HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-testing-library.