-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvitest-e2e.config.mts
More file actions
48 lines (45 loc) · 1.26 KB
/
Copy pathvitest-e2e.config.mts
File metadata and controls
48 lines (45 loc) · 1.26 KB
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 { config } from 'dotenv';
import swc from 'unplugin-swc';
import tsconfigPaths from 'vite-tsconfig-paths';
import { defineConfig } from 'vitest/config';
import { resolve } from 'node:path';
config({ path: resolve(__dirname, '.env.test') });
export default defineConfig({
test: {
globals: true,
root: './',
globalSetup: [
'shared/test/globals/setup-pg-test-containers.ts',
'shared/test/globals/setup-redis-test-container.ts',
],
setupFiles: [
// Added this because type orm models throw error without
'ts-node/register/transpile-only',
'shared/test/setup-tests.ts',
],
include: ['**/*-e2e.spec.ts'],
exclude: [
'**/node_modules/**',
'**/dist/**',
'**/cypress/**',
'**/.{idea,git,cache,output,temp}/**',
'**/{karma,rollup,webpack,vite,vitest,jest,ava,babel,nyc,cypress,tsup,build,eslint,prettier}.config.*',
'**/test/**',
'**/tests/**',
'**/configs/**',
'**/migrations/**',
'**/database/**',
'**/*.module.ts',
'**/*.dto.ts',
'**/*.entity.ts',
],
hookTimeout: 1000 * 60 * 5, // 5 minutes
testTimeout: 1000 * 60 * 3, // 3 minutes
},
plugins: [
swc.vite({
module: { type: 'es6' },
}),
tsconfigPaths(),
],
});