-
Notifications
You must be signed in to change notification settings - Fork 114
/
Copy pathvitest.config.ts
33 lines (32 loc) · 960 Bytes
/
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
import path from 'path';
import { defineConfig } from 'vitest/config';
export default defineConfig({
define: {
__API_ORIGIN__: JSON.stringify('onesignal.com'),
__API_TYPE__: JSON.stringify('staging'),
__BUILD_ORIGIN__: JSON.stringify('onesignal.com'),
__BUILD_TYPE__: JSON.stringify('production'),
__IS_HTTPS__: JSON.stringify(true),
__LOGGING__: JSON.stringify(false),
__NO_DEV_PORT__: JSON.stringify(true),
__VERSION__: JSON.stringify('1'),
},
resolve: {
alias: {
src: path.resolve(__dirname, 'src'),
__test__: path.resolve(__dirname, '__test__'),
},
},
test: {
clearMocks: true,
coverage: {
include: ['src/**'],
reporter: ['text-summary', 'lcov'],
reportsDirectory: 'coverage',
},
environment: 'jsdom',
globals: true,
include: ['src/**/*.test.ts', '__test__/**/*.test.ts'],
setupFiles: ['fake-indexeddb/auto', './__test__/setupTests.ts'],
},
});