-
-
Notifications
You must be signed in to change notification settings - Fork 34
-
-
Notifications
You must be signed in to change notification settings - Fork 34
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
Vitest Failure #227
Comments
@brijeshb42 This is a bit of a continuation of mui/material-ui#43586, but I feel it just warranted it's own issue. |
Duplicate of #8 |
@o-alexandrov Has a workaround been identified for #8 until it gets resolved? |
If you open #8, you’ll see the response from @brijeshb42 who considered it as a non-issue. Hopefully, he has changed his mind since then on this topic |
I started looking into this. src/App.test.tsx:
27 | return false;
28 | }
29 | function getDocument() {
30 | /* istanbul ignore if */
31 | if (typeof window === 'undefined') {
32 | throw new Error('Could not find default container');
^
error: Could not find default container
at getDocument (/Users/brijesh/projects/mui/experiments/material-ui-pigment-css-vite-ts/node_modules/@testing-library/dom/dist/helpers.js:32:11)
at waitFor (/Users/brijesh/projects/mui/experiments/material-ui-pigment-css-vite-ts/node_modules/@testing-library/dom/dist/wait-for.js:15:28)
at /Users/brijesh/projects/mui/experiments/material-ui-pigment-css-vite-ts/node_modules/@testing-library/react/dist/pure.js:88:28
at asyncWrapper (/Users/brijesh/projects/mui/experiments/material-ui-pigment-css-vite-ts/node_modules/@testing-library/react/dist/pure.js:84:23)
at /Users/brijesh/projects/mui/experiments/material-ui-pigment-css-vite-ts/src/App.test.tsx:19:25
at /Users/brijesh/projects/mui/experiments/material-ui-pigment-css-vite-ts/src/App.test.tsx:18:15
at /Users/brijesh/projects/mui/experiments/material-ui-pigment-css-vite-ts/node_modules/@testing-library/react/dist/act-compat.js:48:24
at act (/Users/brijesh/projects/mui/experiments/material-ui-pigment-css-vite-ts/node_modules/react/cjs/react.development.js:2512:16)
at /Users/brijesh/projects/mui/experiments/material-ui-pigment-css-vite-ts/node_modules/@testing-library/react/dist/act-compat.js:47:25
at /Users/brijesh/projects/mui/experiments/material-ui-pigment-css-vite-ts/src/App.test.tsx:18:11
✗ Basic test > renders error UI [714592560.62ms]
✗ Basic test > renders error UI
0 pass
2 fail Could you try this and resolve the test setup such that atleast one test runs (either with success or failure). After that, I'll take a look. |
@brijeshb42 I commented out the node module line and started getting
I'm not seeing the error you mentioned above... |
Steps to reproduce
Link to example
bun install
bun run test
Current behavior
Expected behavior
Vitest passes.
Context
Using the material-ui-pigment-css-vite-ts example the goal is to successfully run
Vitests
.Your environment
npx @mui/envinfo
Search keywords: Vitest
The text was updated successfully, but these errors were encountered: