Skip to content

Commit bbfc947

Browse files
chore(deps-dev): bump vitest and @vitest/browser-playwright to 5.0.3 in /frontend (#1062)
* chore(deps-dev): bump vitest from 4.1.11 to 5.0.1 in /frontend Bumps [vitest](https://github.com/vitest-dev/vitest/tree/HEAD/packages/vitest) from 4.1.11 to 5.0.1. - [Release notes](https://github.com/vitest-dev/vitest/releases) - [Changelog](https://github.com/vitest-dev/vitest/blob/main/docs/releases.md) - [Commits](https://github.com/vitest-dev/vitest/commits/v5.0.1/packages/vitest) --- updated-dependencies: - dependency-name: vitest dependency-version: 5.0.1 dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * fix(frontend): run vitest 5 browser tests on React dev build Bump @vitest/browser-playwright alongside vitest; mixed versions fail to start. * chore(deps): group vitest packages in dependabot --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Eetu Sutinen <eetu.sutinen@gmail.com>
1 parent 7f14869 commit bbfc947

5 files changed

Lines changed: 168 additions & 594 deletions

File tree

‎.github/dependabot.yaml‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff 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"

‎frontend/.gitignore‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ yarn-error.log*
2020
test-results
2121
playwright-report
2222
__screenshots__
23-
.vitest-attachments
23+
.vitest*
2424

2525
# local env files
2626
.env*

‎frontend/package.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
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",
@@ -50,7 +50,7 @@
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"

‎frontend/vitest.config.ts‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff 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,

0 commit comments

Comments
 (0)