Skip to content

Commit 9862397

Browse files
chore(deps): update dependency vitest to v4 (#697)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: sapphi-red <49056869+sapphi-red@users.noreply.github.com>
1 parent 6217a8b commit 9862397

File tree

3 files changed

+86
-184
lines changed

3 files changed

+86
-184
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
"typescript": "^5.9.3",
6262
"typescript-eslint": "^8.46.3",
6363
"vite": "catalog:",
64-
"vitest": "^3.2.4",
64+
"vitest": "^4.0.8",
6565
"vue": "catalog:"
6666
},
6767
"simple-git-hooks": {

playground/vitestSetup.ts

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ import {
2020
preview,
2121
} from 'vite'
2222
import type { Browser, Page } from 'playwright-chromium'
23-
import type { File } from 'vitest'
2423
import { beforeAll } from 'vitest'
2524

2625
// #region env
@@ -92,13 +91,7 @@ export function setViteUrl(url: string): void {
9291

9392
const DIR = join(os.tmpdir(), 'vitest_playwright_global_setup')
9493

95-
beforeAll(async (s) => {
96-
const suite = s as File
97-
// skip browser setup for non-playground tests
98-
if (!suite.filepath.includes('playground')) {
99-
return
100-
}
101-
94+
beforeAll(async (suite) => {
10295
const wsEndpoint = fs.readFileSync(join(DIR, 'wsEndpoint'), 'utf-8')
10396
if (!wsEndpoint) {
10497
throw new Error('wsEndpoint not found')
@@ -132,7 +125,7 @@ beforeAll(async (s) => {
132125
browserErrors.push(error)
133126
})
134127

135-
testPath = suite.filepath!
128+
testPath = suite.file.filepath
136129
testName = slash(testPath).match(/playground\/([\w-]+)\//)?.[1]
137130
testDir = dirname(testPath)
138131

0 commit comments

Comments
 (0)