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

vitest.config.ts

35 lines794 Bytes

1import { defineConfig } from 'vitest/config'
2import { resolve } from 'path'
3import { fileURLToPath } from 'url'
4​
5const __dirname = fileURLToPath(new URL('.', import.meta.url))
6​
7export default defineConfig({
8 test: {
9 globals: true,
10 environment: 'jsdom',
11 include: ['tests/**/*.test.ts', 'tests/**/*.test.tsx'],
12 coverage: {
13 provider: 'v8',
14 reporter: ['text', 'json', 'html', 'lcov'],
15 exclude: [
16 'node_modules/',
17 'dist/',
18 'tests/',
19 '**/*.test.ts',
20 '**/*.test.tsx',
21 '**/*.config.ts',
22 '**/types.ts',
23 ],
24 include: ['src/**/*.ts'],
25 },
26 },
27 resolve: {
28 alias: {
29 '@tanstack/ai-event-client': resolve(
30 __dirname,
31 '../ai-event-client/src/index.ts',
32 ),
33 },
34 },
35})