-
-
Notifications
You must be signed in to change notification settings - Fork 120
/
Copy pathvite.config.mts
44 lines (42 loc) · 1.25 KB
/
vite.config.mts
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
/// <reference types="vitest" />
import angular from '@analogjs/vite-plugin-angular';
import { configDefaults, defineConfig } from 'vitest/config';
// https://vitejs.dev/config/
export default defineConfig(({ mode }) => {
return {
plugins: [angular()],
test: {
environment: 'jsdom',
include: ['**/*.spec.ts'],
reporters: ['default'],
globals: true,
pool: 'threads',
fakeTimers: {
toFake: ['setTimeout', 'clearTimeout', 'setInterval', 'clearInterval', 'queueMicrotask'],
},
// globalSetup: 'test/vitest-global-setup.ts',
setupFiles: ['./test/test-setup.ts', 'test/vitest-pretest.ts', 'test/vitest-global-mocks.ts'],
coverage: {
include: ['src/app/modules/angular-slickgrid/**/*.ts'],
exclude: [
...configDefaults.exclude,
'**/__tests__/**',
'**/interfaces/**',
'**/models/**',
'**/*.d.ts',
'**/slickgrid-config.ts',
'**/global-grid-options.ts',
'**/*.interface.ts',
'**/interfaces.ts',
'**/index.ts',
'**/*.spec.ts',
],
},
provider: 'v8',
reportOnFailure: true,
},
define: {
'import.meta.vitest': mode !== 'production',
},
};
});