-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathvitest.config.js
More file actions
38 lines (33 loc) · 1007 Bytes
/
vitest.config.js
File metadata and controls
38 lines (33 loc) · 1007 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
36
37
38
import { SummaryReporter } from '@hypothesis/frontend-testing/vitest';
import { playwright } from '@vitest/browser-playwright';
import { defineConfig } from 'vitest/config';
import { excludeFromCoverage } from './rollup-tests.config.js';
export default defineConfig({
test: {
globals: true,
reporters: [new SummaryReporter()],
browser: {
provider: playwright(),
enabled: true,
headless: true,
screenshotFailures: false,
instances: [{ browser: 'chromium' }],
viewport: { width: 1024, height: 768 },
},
// CSS bundle relied upon by accessibility tests (eg. for color-contrast
// checks).
setupFiles: './build/styles/test.css',
include: [
// Test bundle
'./build/scripts/tests.bundle.js',
],
coverage: {
enabled: true,
provider: 'istanbul',
reportsDirectory: './coverage',
reporter: ['json', 'html'],
include: ['src/**/*.{ts,tsx}'],
exclude: excludeFromCoverage,
},
},
});