-
Notifications
You must be signed in to change notification settings - Fork 248
Expand file tree
/
Copy pathvitest.config.ts
More file actions
57 lines (51 loc) · 1.69 KB
/
vitest.config.ts
File metadata and controls
57 lines (51 loc) · 1.69 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
49
50
51
52
53
54
55
56
57
import { defineConfig } from 'vitest/config'
// NOTE: we use vite-rolldown instead of vite. Vite is migrating from
// using ESBuild to Rolldown. The bundler we use `tsdown`, is also built
// on Rolldown, which means it has the same features. Specifically ESBuild
// does not support emitting decorator metadata, a feature we rely on heavily
// for class-transformer, class-validator and tsyringe.
export default defineConfig({
test: {
// Ideally we move away from globals, but this
// makes the migration from jest a lot easier
globals: true,
watch: false,
// hooks sometimes interact with ledger etc, so it needs to be longer than default 10000
hookTimeout: 40000,
testTimeout: 120000,
setupFiles: ['./tests/setup.ts'],
coverage: {
include: ['**/*.{js,jsx,ts,tsx}'],
exclude: ['/build/', '/node_modules/', '/__tests__/', 'tests', 'coverage', '*.d.ts'],
},
// Enable for debugging
logHeapUsage: true,
projects: [
{
extends: true,
test: {
name: 'unit',
include: ['**/*.{test,spec}.?(c|m)[jt]s?(x)'],
// Ignore e2e tests
exclude: ['**/node_modules/**', '**/build/**', '**/*.e2e.{test,spec}.?(c|m)[jt]s?(x)'],
},
},
{
extends: true,
test: {
name: 'e2e',
include: ['**/*.e2e.{test,spec}.?(c|m)[jt]s?(x)'],
// Ignore drizzle tests
exclude: ['**/node_modules/**', '**/build/**', '**/*.drizzle.e2e.{test,spec}.?(c|m)[jt]s?(x)'],
},
},
{
extends: true,
test: {
name: 'drizzle',
include: ['**/*.drizzle.e2e.{test,spec}.?(c|m)[jt]s?(x)'],
},
},
],
},
})