Skip to content

Commit febe836

Browse files
committed
Upgrade to latest vitest
1 parent 9ace9de commit febe836

File tree

4 files changed

+167
-874
lines changed

4 files changed

+167
-874
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
"eslint-plugin-react": "^7.33.2",
4545
"eslint-plugin-react-hooks": "^4.6.0",
4646
"fs-extra": "^11.1.0",
47-
"vitest": "^1.0.4",
47+
"vitest": "^2.1.2",
4848
"playwright-chromium": "^1.39.0",
4949
"prettier": "^2.8.8",
5050
"prettier-plugin-organize-imports": "^3.2.3",

packages/fastify-renderer/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@
9999
"eslint-plugin-react-hooks": "^4.6.0",
100100
"fastify": "^4.24.2",
101101
"gitpkg": "^1.0.0-beta.2",
102-
"vitest": "^0.34.6",
102+
"vitest": "^2.1.2",
103103
"npm-run-all": "^4.1.5",
104104
"pino-pretty": "^8.1.0",
105105
"prettier": "^2.7.1",

packages/test-apps/simple-react/helpers.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,9 @@ let err: Error
2121
export const port = 3001 + parseInt(process.env.VITEST_WORKER_ID!) - 1
2222
export const rootURL = `http://localhost:${port}`
2323

24-
beforeAll(async ({ filepath }) => {
25-
const testPath = filepath!
24+
beforeAll(async (suite) => {
2625
// eslint-disable-next-line @typescript-eslint/prefer-regexp-exec
27-
const testName = slash(testPath).match(/test-apps\/([\w-]+)\//)?.[1]
26+
const testName = slash(suite.file.filepath).match(/test-apps\/([\w-]+)\//)?.[1]
2827

2928
// if this is a test placed under test-apps/xxx/test/
3029
// start a fastify server in that directory.

0 commit comments

Comments
 (0)