-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvitest.config.ts
87 lines (78 loc) · 3.59 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
/*
███████████████████████████████████████████████████████████████████████████████
██******************** PRESENTED BY t33n Software ***************************██
██ ██
██ ████████╗██████╗ ██████╗ ███╗ ██╗ ██
██ ╚══██╔══╝╚════██╗╚════██╗████╗ ██║ ██
██ ██║ █████╔╝ █████╔╝██╔██╗ ██║ ██
██ ██║ ╚═══██╗ ╚═══██╗██║╚██╗██║ ██
██ ██║ ██████╔╝██████╔╝██║ ╚████║ ██
██ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═══╝ ██
██ ██
███████████████████████████████████████████████████████████████████████████████
███████████████████████████████████████████████████████████████████████████████
*/
// ==== DEPENDENCIES ====
import tsconfigPaths from 'vite-tsconfig-paths'
import { defineConfig } from 'vitest/config'
/**
* Represents the configuration for the Vitest test runner.
*/
export default defineConfig({
/**
* List of plugins to be used in the configuration.
*/
plugins: [tsconfigPaths()], // 🔌 Add tsconfig paths plugin
/**
* Configuration options for tests.
*/
test: {
/**
* Indicates whether to watch files for changes.
*
* @type {boolean}
*/
watch: false, // 🚫 Disable watch mode
/**
* Path to the setup file that runs before each test.
*
* @type {string}
*/
setupFiles: 'test/unit/pretestEach.ts',
/**
* Path to the global setup file for integration tests.
*
* @type {string}
*/
globalSetup: 'test/integration/pretestAll.ts',
/**
* The environment in which the tests will run.
*
* @type {string}
*/
environment: 'node', // 🌐 Test environment set to Node.js
/**
* Configuration for coverage reporting.
*/
coverage: {
/**
* Specifies the directories to include for coverage.
*
* @type {Array<string>}
*/
include: ['src/'],
/**
* Specifies the files or directories to exclude from coverage.
*
* @type {Array<string>}
*/
exclude: ['dist/'],
/**
* Specifies the coverage reporters to use.
*
* @type {Array<string>}
*/
reporter: ['text', 'json', 'html']
}
}
})