-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.js
More file actions
23 lines (22 loc) · 896 Bytes
/
Copy pathvite.config.js
File metadata and controls
23 lines (22 loc) · 896 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/// <reference types="vitest/config" />
import { defineConfig } from 'vitest/config'
import react from '@vitejs/plugin-react'
export default defineConfig({
plugins: [react()],
test: {
// Default env is node — fast, and correct for the large pure-logic suite.
// Component render tests opt into happy-dom per-file via a
// `// @vitest-environment happy-dom` docblock, so the two coexist without a
// second config.
environment: 'node',
include: ['src/**/*.test.{js,ts,jsx,tsx}', 'scripts/**/*.test.{js,ts,mjs}'],
coverage: {
provider: 'v8',
reporter: ['text', 'text-summary'],
// Coverage is measured on the pure-logic core (parsers, metrics,
// legibility layer, runtime store) — the deterministic code the tests
// actually pin. UI/3D/render layers are intentionally excluded.
include: ['src/lib/**/*.ts'],
},
},
})