-
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathvitest.config.browser.ts
More file actions
35 lines (34 loc) · 812 Bytes
/
vitest.config.browser.ts
File metadata and controls
35 lines (34 loc) · 812 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import { defineConfig } from "vitest/config"
import { playwright } from "@vitest/browser-playwright"
export default defineConfig({
test: {
browser: {
enabled: true,
provider: playwright(),
instances: [
{
browser: "chromium",
},
{
browser: "firefox",
},
{
browser: "webkit",
},
],
// Enable headless mode by default, can be overridden with --browser.headless=false
headless: true,
// Screenshot on failure
screenshotFailures: true,
},
// Increase timeouts for browser tests
testTimeout: 30000,
hookTimeout: 30000,
// Don't use globals in browser tests to avoid pollution
globals: false,
// Retry failed tests once in browser mode
retry: 1,
// Include only browser-specific tests
include: ["test/**/*.browser.test.ts"],
},
})