Skip to content

Commit

Permalink
DEVPROD-8865: Upgrade Vitest to v2.0.5 (#343)
Browse files Browse the repository at this point in the history
  • Loading branch information
minnakt authored Aug 28, 2024
1 parent 0844acd commit 179c3ef
Show file tree
Hide file tree
Showing 11 changed files with 169 additions and 136 deletions.
4 changes: 2 additions & 2 deletions apps/parsley/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
"react-dropzone": "14.2.3",
"react-router-dom": "6.16.0",
"react-virtuoso": "4.7.12",
"vite-node": "^1.6.0",
"vite-node": "^2.0.5",
"xss": "1.0.15"
},
"devDependencies": {
Expand Down Expand Up @@ -130,7 +130,7 @@
"vite-plugin-checker": "0.6.4",
"vite-plugin-env-compatible": "2.0.1",
"vite-tsconfig-paths": "4.3.2",
"vitest": "1.6.0"
"vitest": "2.0.5"
},
"engines": {
"node": ">=20.11.0"
Expand Down
2 changes: 0 additions & 2 deletions apps/parsley/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,6 @@ export default defineConfig({
environment: "jsdom",
globals: true,
outputFile: { junit: "./bin/vitest/junit.xml" },
// https://vitest.dev/guide/common-errors.html#failed-to-terminate-worker
pool: "forks",
reporters: ["default", ...(process.env.CI === "true" ? ["junit"] : [])],
setupFiles: "./config/vitest/setupTests.ts",
},
Expand Down
2 changes: 1 addition & 1 deletion apps/spruce/config/vitest/setupTests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ window.crypto.randomUUID = (() => {
// Workaround for a bug in @testing-library/react.
// It prevents Vitest's fake timers from functioning with user-event.
// https://github.com/testing-library/react-testing-library/issues/1197
// @ts-expect-error: FIXME. This comment was added by an automated script.
// @ts-expect-error
globalThis.jest = {
...globalThis.jest,
advanceTimersByTime: vi.advanceTimersByTime.bind(vi),
Expand Down
4 changes: 2 additions & 2 deletions apps/spruce/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@
"react-router-dom": "6.16.0",
"react-string-replace": "1.1.1",
"react-virtuoso": "^4.7.12",
"vite-node": "^1.6.0"
"vite-node": "^2.0.5"
},
"devDependencies": {
"@emotion/babel-plugin": "11.11.0",
Expand Down Expand Up @@ -177,7 +177,7 @@
"vite-plugin-env-compatible": "2.0.1",
"vite-plugin-imp": "2.4.0",
"vite-tsconfig-paths": "4.3.2",
"vitest": "1.6.0",
"vitest": "2.0.5",
"vitest-canvas-mock": "0.3.3"
},
"resolutions": {
Expand Down
1 change: 0 additions & 1 deletion apps/spruce/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,6 @@ export default defineConfig({
globals: true,
globalSetup: "./config/vitest/global-setup.ts",
outputFile: { junit: "./bin/vitest/junit.xml" },
pool: "forks", // https://vitest.dev/guide/common-errors.html#failed-to-terminate-worker
reporters: ["default", ...(process.env.CI === "true" ? ["junit"] : [])],
setupFiles: "./config/vitest/setupTests.ts",
},
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@
"husky": "9.0.11",
"lint-staged": "15.2.2",
"storybook": "8.2.9",
"vitest": "1.6.0"
"vitest": "2.0.5"
}
}
4 changes: 2 additions & 2 deletions packages/deploy-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@
},
"dependencies": {
"@evg-ui/lib": "*",
"vite-node": "^1.6.0"
"vite-node": "^2.0.5"
},
"devDependencies": {
"@evg-ui/eslint-config": "*",
"@types/node": "^20.12.7",
"eslint": "8.56.0",
"eslint-plugin-prettier": "5.1.3",
"typescript": "5.1.3",
"vitest": "1.6.0"
"vitest": "2.0.5"
},
"bin": {
"deploy-utils-build-and-push": "src/build-and-push/script.ts",
Expand Down
1 change: 0 additions & 1 deletion packages/deploy-utils/vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ export default defineConfig({
environment: "node",
globals: true,
outputFile: { junit: "./bin/vitest/junit.xml" },
pool: "forks", // https://vitest.dev/guide/common-errors.html#failed-to-terminate-worker
reporters: ["default", ...(process.env.CI === "true" ? ["junit"] : [])],
},
});
2 changes: 1 addition & 1 deletion packages/lib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@
"eslint-plugin-prettier": "5.1.3",
"storybook": "8.2.9",
"typescript": "5.1.3",
"vitest": "1.6.0"
"vitest": "2.0.5"
}
}
1 change: 0 additions & 1 deletion packages/lib/vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ export default defineConfig({
environment: "jsdom",
globals: true,
outputFile: { junit: "./bin/vitest/junit.xml" },
pool: "forks", // https://vitest.dev/guide/common-errors.html#failed-to-terminate-worker
reporters: ["default", ...(process.env.CI === "true" ? ["junit"] : [])],
},
});
Loading

0 comments on commit 179c3ef

Please sign in to comment.