-
Notifications
You must be signed in to change notification settings - Fork 132
Expand file tree
/
Copy pathvitest.config.ts
More file actions
32 lines (31 loc) · 858 Bytes
/
vitest.config.ts
File metadata and controls
32 lines (31 loc) · 858 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
import { defineVitestConfig } from '@stencil/vitest/config';
import { playwright } from '@vitest/browser-playwright';
export default defineVitestConfig({
stencilConfig: './stencil.config.ts',
test: {
projects: [
// Unit tests - stencil environment for component logic
{
test: {
name: 'unit',
include: ['src/**/*.unit.test.{ts,tsx}'],
environment: 'stencil',
},
},
// Component browser tests - real browser via Playwright
{
test: {
name: 'browser',
include: ['src/**/*.cmp.test.{ts,tsx}'],
setupFiles: ['./vitest-setup.ts'],
browser: {
enabled: true,
provider: playwright(),
headless: true,
instances: [{ browser: 'chromium' }],
},
},
},
],
},
});