- Add vitest as dev dependency - Create vitest.config.ts with globals, TypeScript support, coverage - Add npm scripts: test, test:watch, test:coverage
17 lines
435 B
TypeScript
17 lines
435 B
TypeScript
import { defineConfig } from 'vitest/config';
|
|
|
|
export default defineConfig({
|
|
test: {
|
|
// Enable test globals (describe, it, expect without imports)
|
|
globals: true,
|
|
// Test file pattern
|
|
include: ['**/*.test.ts'],
|
|
// TypeScript support uses tsconfig.json automatically
|
|
// Coverage reporter (optional, for future use)
|
|
coverage: {
|
|
provider: 'v8',
|
|
reporter: ['text', 'json', 'html'],
|
|
},
|
|
},
|
|
});
|