-
-
Notifications
You must be signed in to change notification settings - Fork 158
Expand file tree
/
Copy pathvitest.config.js
More file actions
30 lines (28 loc) · 745 Bytes
/
vitest.config.js
File metadata and controls
30 lines (28 loc) · 745 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
import { defineConfig } from 'vitest/config';
import react from '@vitejs/plugin-react';
import { playwright } from '@vitest/browser-playwright';
const isCI = process.env.CI === 'true';
const isMac = process.platform === 'darwin';
export default defineConfig({
plugins: [react()],
test: {
browser: {
enabled: true,
provider: playwright({
launchOptions: {
headless: true
}
}),
instances: [
{
browser: 'chromium',
headless: true
},
...(isCI ? [{ browser: 'firefox', headless: true }] : []),
...(!isCI && isMac ? [{ browser: 'webkit', headless: true }] : [])
]
},
globals: true,
setupFiles: ['./test/setup.js']
}
});