-
Notifications
You must be signed in to change notification settings - Fork 25
/
vitest.config.ts
44 lines (42 loc) · 1.08 KB
/
vitest.config.ts
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
36
37
38
39
40
41
42
43
44
import { defineConfig } from 'vitest/config';
const SAFARI = process.env.BROWSER === 'safari';
export default defineConfig({
test: {
exclude: [
'**/node_modules/**',
'**/esm/**',
'**/docs/**',
'**/examples/**',
],
include: ['**/src/*.test.*'],
browser: {
enabled: true,
name: process.env.BROWSER ?? 'chromium',
provider: SAFARI ? 'webdriverio' : 'playwright',
// https://playwright.dev
providerOptions: process.env.GITHUB_ACTIONS
? {
capabilities: {
'goog:chromeOptions': {
args: ['disable-gpu', 'no-sandbox', 'disable-setuid-sandbox'],
},
},
}
: SAFARI
? {
capabilities: {
alwaysMatch: { browserName: 'safari' },
firstMatch: [{}],
browserName: 'safari',
},
}
: {},
},
},
server: {
headers: {
'Cross-Origin-Embedder-Policy': 'require-corp',
'Cross-Origin-Opener-Policy': 'same-origin',
},
},
});