Repository navigation
Expand file tree
/
Copy pathvitest.config.ts
More file actions
51 lines (50 loc) · 1.71 KB
/
Copy pathvitest.config.ts
File metadata and controls
51 lines (50 loc) · 1.71 KB
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
import { defineVitestConfig } from '@stencil/vitest/config';
import { stencilVitestPlugin } from '@stencil/vitest/plugin';
import { playwright } from '@vitest/browser-playwright';
export default defineVitestConfig({
stencilConfig: './stencil.config.ts',
test: {
coverage: {
provider: 'v8',
exclude: [
'src/components/tests',
],
},
projects: [
{
test: {
name: 'unit',
include: ['src/tests/**/*.unit.{ts,tsx}'],
environment: 'node',
},
},
{
plugins: [stencilVitestPlugin()],
test: {
name: 'spec',
include: ['src/tests/**/*.spec.{ts,tsx}'],
environment: 'stencil',
environmentOptions: {
stencil: {
domEnvironment: 'jsdom',
},
},
},
},
{
test: {
name: 'browser',
include: ['src/**/*.test.{ts,tsx}'],
setupFiles: ['./vitest-setup.ts'],
browser: {
enabled: true,
provider: playwright(),
headless: true,
instances: [{browser: 'chromium'}],
screenshotFailures: false,
},
},
},
],
},
});