-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathvitest.config.ts
48 lines (43 loc) · 1.15 KB
/
vitest.config.ts
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
45
46
47
48
import path from 'path';
import { defineConfig, mergeConfig } from 'vitest/config';
import viteConfig from './vite.config.ts';
export default defineConfig(configEnv =>
mergeConfig(
viteConfig(configEnv),
defineConfig({
root: path.resolve(__dirname, '.'),
resolve: {
alias: [
{
find: '@helsenorge/datepicker',
replacement: path.resolve(__dirname, 'node_modules/@helsenorge/datepicker'),
},
],
},
test: {
testTimeout: 30000,
include: ['src/**/*-spec.ts', 'src/**/*-spec.tsx'],
globals: true,
environment: 'jsdom',
setupFiles: [path.resolve(__dirname, 'test/setup-test.ts')],
css: {
modules: {
classNameStrategy: 'non-scoped',
},
},
coverage: {
reporter: ['cobertura', 'json'],
},
reporters: ['default', 'junit', 'html'],
outputFile: {
junit: 'test-report.xml',
},
server: {
deps: {
inline: ['@helsenorge/designsystem-react', '@helsenorge/datepicker'],
},
},
},
})
)
);