-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvitest.config.ts
More file actions
58 lines (56 loc) · 1.68 KB
/
Copy pathvitest.config.ts
File metadata and controls
58 lines (56 loc) · 1.68 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
52
53
54
55
56
57
58
/**
* @fileoverview Vitest config for the consumer server. Uses Vitest 4 `projects`
* so you can split suites (unit/smoke/integration/fuzz) and run each with
* `--project <name>` as the surface grows. Extends the framework's base config
* for shared `resolve`, `ssr`, and coverage settings.
*
* @module vitest.config
*/
import { defineConfig, mergeConfig } from 'vitest/config';
import coreConfig from '@cyanheads/mcp-ts-core/vitest.config';
const alias = { '@/': new URL('./src/', import.meta.url).pathname };
export default mergeConfig(
coreConfig,
defineConfig({
resolve: { alias },
test: {
projects: [
{
extends: true,
test: {
name: 'unit',
include: ['src/**/*.test.ts', 'tests/**/*.test.ts'],
exclude: ['tests/smoke/**', 'tests/integration/**', 'tests/fuzz/**'],
},
},
// Add more projects as your suite grows. Each inherits the framework's
// base config (environment, pool, coverage) and can override freely.
//
// {
// extends: true,
// test: {
// name: 'smoke',
// include: ['tests/smoke/**/*.test.ts'],
// },
// },
// {
// extends: true,
// test: {
// name: 'fuzz',
// include: ['tests/fuzz/**/*.test.ts'],
// testTimeout: 15_000,
// },
// },
// {
// extends: true,
// test: {
// name: 'integration',
// include: ['tests/integration/**/*.test.ts'],
// maxWorkers: 1,
// testTimeout: 30_000,
// },
// },
],
},
}),
);