Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"typescript": "^5.9.3",
"typescript-eslint": "^8.46.3",
"vite": "catalog:",
"vitest": "^3.2.4",
"vitest": "^4.0.8",
"vue": "catalog:"
},
"simple-git-hooks": {
Expand Down
11 changes: 2 additions & 9 deletions playground/vitestSetup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import {
preview,
} from 'vite'
import type { Browser, Page } from 'playwright-chromium'
import type { File } from 'vitest'
import { beforeAll } from 'vitest'

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

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

beforeAll(async (s) => {
const suite = s as File
// skip browser setup for non-playground tests
if (!suite.filepath.includes('playground')) {
return
}

beforeAll(async (suite) => {
const wsEndpoint = fs.readFileSync(join(DIR, 'wsEndpoint'), 'utf-8')
if (!wsEndpoint) {
throw new Error('wsEndpoint not found')
Expand Down Expand Up @@ -132,7 +125,7 @@ beforeAll(async (s) => {
browserErrors.push(error)
})

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

Expand Down
Loading
Loading