-
Notifications
You must be signed in to change notification settings - Fork 43
Expand file tree
/
Copy pathvitest.config.ts
More file actions
36 lines (35 loc) · 948 Bytes
/
vitest.config.ts
File metadata and controls
36 lines (35 loc) · 948 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
33
34
35
36
import { defineConfig } from 'vitest/config';
/**
* Vitest configuration for unified monorepo testing.
*
* Uses the `projects` feature to run tests across multiple packages with
* a single command and unified reporting.
*
* @example
* ```bash
* pnpm vitest # Run all package tests
* pnpm vitest --project=backend # Run only backend tests
* ```
*
* @link https://vitest.dev/guide/projects
*/
export default defineConfig({
test: {
projects: [
// Reference folders directly - Vitest picks up their vitest.config.ts
'backend',
'shared',
// Frontend: inline config for node tests only (Storybook tests run separately)
{
test: {
name: 'frontend',
root: './frontend',
include: ['vite/**/*.test.ts'],
environment: 'node',
setupFiles: ['./vitest.setup.ts'],
passWithNoTests: true,
},
},
],
},
});