Open History to see the last commit
1import { defineConfig, mergeConfig } from 'vitest/config'
2import { tanstackViteConfig } from '@tanstack/vite-config'
3import packageJson from './package.json'
4
5const config = defineConfig({
6 test: {
7 name: packageJson.name,
8 dir: './',
9 watch: false,
10
11 globals: true,
12 environment: 'node',
13 // In-sandbox adapter tests spawn a real local-process sandbox.
14 // Under Nx parallel load the default 5s budget is too tight.
15 testTimeout: 30_000,
16 include: ['tests/**/*.test.ts'],
17 coverage: {
18 provider: 'v8',
19 reporter: ['text', 'json', 'html', 'lcov'],
20 exclude: [
21 'node_modules/',
22 'dist/',
23 'tests/',
24 '**/*.test.ts',
25 '**/*.config.ts',
26 '**/types.ts',
27 ],
28 include: ['src/**/*.ts'],
29 },
30 },
31})
32
33export default mergeConfig(
34 config,
35 tanstackViteConfig({
36 entry: ['./src/index.ts', './src/byok.ts'],
37 srcDir: './src',
38 cjs: false,
39 }),
40)