Open History to see the last commit
1import { defineConfig } from 'vitest/config'
2import angular from '@analogjs/vite-plugin-angular'
3import tsconfigPaths from 'vite-tsconfig-paths'
4import packageJson from './package.json'
5β
6const tsconfigPath = 'tsconfig.spec.json'
7β
8export default defineConfig(({ mode }) => ({
9 plugins: [
10 tsconfigPaths({ projects: [tsconfigPath] }),
11 angular({ tsconfig: tsconfigPath }),
12 ],
13 test: {
14 name: packageJson.name,
15 dir: './tests',
16 watch: false,
17 environment: 'jsdom',
18 setupFiles: ['./tests/test-setup.ts'],
19 coverage: { enabled: true, provider: 'istanbul', include: ['src/**/*'] },
20 typecheck: { enabled: true },
21 globals: true,
22 restoreMocks: true,
23 },
24 define: {
25 'import.meta.vitest': mode !== 'production',
26 },
27}))