Skip to content
Source
Sign inSign up
TanStack/form
Open History to see the last commit

vitest.config.ts

28 lines773 Bytes

1import { defineConfig } from 'vitest/config'
2import solid from 'vite-plugin-solid'
3import { playwright } from '@vitest/browser-playwright'
4import packageJson from './package.json' with { type: 'json' }
5​
6export default defineConfig({
7 plugins: [solid()],
8 test: {
9 name: packageJson.name,
10 dir: './tests',
11 watch: false,
12 globals: true,
13 // Override vite-plugin-solid's jsdom default; tests run in the browser.
14 environment: 'node',
15 browser: {
16 enabled: true,
17 provider: playwright(
18 process.env.CI ? { launchOptions: { channel: 'chrome' } } : {},
19 ),
20 instances: [{ browser: 'chromium', headless: true }],
21 },
22 coverage: {
23 enabled: true,
24 provider: 'istanbul',
25 include: ['src/**/*'],
26 },
27 },
28})