File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -18,6 +18,11 @@ updates:
1818 - " react"
1919 - " react-dom"
2020 - " @types/react"
21+ # vitest refuses to run with mismatched @vitest/* versions
22+ vitest :
23+ patterns :
24+ - " vitest"
25+ - " @vitest/*"
2126 minor-and-patch :
2227 update-types :
2328 - " minor"
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ yarn-error.log*
2020test-results
2121playwright-report
2222__screenshots__
23- .vitest-attachments
23+ .vitest *
2424
2525# local env files
2626.env *
Original file line number Diff line number Diff line change 3939 "@types/react" : " ^19.3.0" ,
4040 "@types/react-dom" : " ^19.3.0" ,
4141 "@vitejs/plugin-react" : " ^6.1.1" ,
42- "@vitest/browser-playwright" : " ^4.1.11 " ,
42+ "@vitest/browser-playwright" : " ^5.0.3 " ,
4343 "babel-plugin-react-compiler" : " ^1.0.0" ,
4444 "eslint" : " ^10.11.0" ,
4545 "playwright" : " ^1.63.0" ,
5050 "vite" : " ^8.3.1" ,
5151 "vite-plugin-qrcode" : " ^0.4.1" ,
5252 "vite-tsconfig-paths" : " ^6.1.1" ,
53- "vitest" : " ^4.1.11 " ,
53+ "vitest" : " ^5.0.3 " ,
5454 "vitest-browser-react" : " ^2.3.0"
5555 },
5656 "packageManager" : " yarn@4.18.0"
Original file line number Diff line number Diff line change @@ -25,6 +25,14 @@ export default mergeConfig(
2525 } ,
2626 {
2727 // Browser tests for React components
28+ // Vitest keeps process.env in pre-bundled deps, so both of React's
29+ // CJS builds get bundled and rolldown inlines the production build's
30+ // `jsxDEV = void 0`. Pin the dev build (vitest-dev/vitest#11265).
31+ optimizeDeps : {
32+ rolldownOptions : {
33+ transform : { define : { "process.env.NODE_ENV" : JSON . stringify ( "development" ) } } ,
34+ } ,
35+ } ,
2836 test : {
2937 name : "browser" ,
3038 globals : true ,
You can’t perform that action at this time.
0 commit comments