Skip to content

Commit

Permalink
Upgrade to latest vitest
Browse files Browse the repository at this point in the history
airhorns committed Oct 2, 2024
1 parent 9ace9de commit febe836
Showing 4 changed files with 167 additions and 874 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -44,7 +44,7 @@
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-react-hooks": "^4.6.0",
"fs-extra": "^11.1.0",
"vitest": "^1.0.4",
"vitest": "^2.1.2",
"playwright-chromium": "^1.39.0",
"prettier": "^2.8.8",
"prettier-plugin-organize-imports": "^3.2.3",
2 changes: 1 addition & 1 deletion packages/fastify-renderer/package.json
Original file line number Diff line number Diff line change
@@ -99,7 +99,7 @@
"eslint-plugin-react-hooks": "^4.6.0",
"fastify": "^4.24.2",
"gitpkg": "^1.0.0-beta.2",
"vitest": "^0.34.6",
"vitest": "^2.1.2",
"npm-run-all": "^4.1.5",
"pino-pretty": "^8.1.0",
"prettier": "^2.7.1",
5 changes: 2 additions & 3 deletions packages/test-apps/simple-react/helpers.ts
Original file line number Diff line number Diff line change
@@ -21,10 +21,9 @@ let err: Error
export const port = 3001 + parseInt(process.env.VITEST_WORKER_ID!) - 1
export const rootURL = `http://localhost:${port}`

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

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

0 comments on commit febe836

Please sign in to comment.