-
-
Notifications
You must be signed in to change notification settings - Fork 51
/
vite.config.ts
65 lines (62 loc) · 2 KB
/
vite.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
import { defineConfig } from 'vitest/config';
import tsconfigPaths from 'vite-tsconfig-paths';
const { CI } = process.env;
const isCI = (CI || 'false') === 'true';
export default defineConfig({
plugins: [
tsconfigPaths(),
],
test: {
browser: {
provider: 'playwright',
enabled: true,
headless: isCI,
isolate: true,
...(
{
name: 'chromium', // pw
// name: 'chrome', // wdio
}
),
},
include: [
'**/*test*/date-picker/**.test.ts',
'**/*test*/date-picker-dialog/**.test.ts',
'**/*test*/date-picker-input/**.test.ts',
'**/*test*/date-picker-input-surface/**.test.ts',
'**/*test*/helpers/clamp-value.test.ts',
'**/*test*/helpers/date-validator.test.ts',
'**/*test*/helpers/focus-element.test.ts',
'**/*test*/helpers/is-in-current-month.test.ts',
'**/*test*/helpers/nullish-attribute-converter.test.ts',
'**/*test*/helpers/to-closest-target.test.ts',
'**/*test*/helpers/to-date-string.test.ts',
'**/*test*/helpers/to-day-diff-inclusive.test.ts',
'**/*test*/helpers/to-formatters.test.ts',
'**/*test*/helpers/to-multi-calendars.test.ts',
'**/*test*/helpers/to-next-selectable-date.test.ts',
'**/*test*/helpers/to-next-selected-date.test.ts',
'**/*test*/helpers/to-resolved-date.test.ts',
'**/*test*/helpers/to-year-list.test.ts',
'**/*test*/helpers/warn-undefined-element.test.ts',
'**/*test*/icon-button/**.test.ts',
'**/*test*/month-calendar/**.test.ts',
'**/*test*/year-grid/**.test.ts',
'**/*test*/year-grid-button/**.test.ts',
],
clearMocks: true,
coverage: {
thresholds: {
"100": false,
autoUpdate: true,
},
exclude: ['**/*{benchmarks,demo,mocks,tests}*/**', '**/swipe-tracker/**'],
provider: 'istanbul',
reporter: ['lcov', 'text'],
},
environment: 'happy-dom',
globals: true,
setupFiles: ['./src/setup-test.ts'],
watch: !isCI,
},
});