generated from actions/typescript-action
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvitest.config.ts
42 lines (38 loc) · 1.4 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
/// <reference types="vitest" />
// Configure Vitest (https://vitest.dev/config/)
import path from 'node:path'
import {defaultExclude, defineConfig} from 'vitest/config'
export default defineConfig({
test: {
environment: 'node',
setupFiles: ['vitest.setup.ts'],
exclude: [
...defaultExclude,
'**/.{devcontainer,github,vscode}/**',
'**/{bin,dist,example,payload-example}/**',
'**/*.config.*',
'**/{vitest}.setup.*',
'__tests__/helpers/**'
],
clearMocks: true,
restoreMocks: false
},
resolve: {
alias: {
/**
* Used to resolve vi.mock() files
* These have to match with tsconfig.json paths
*/
'@/common/': `${path.resolve(process.cwd(), 'src/common')}/`,
'@/delete/': `${path.resolve(process.cwd(), 'src/delete')}/`,
'@/deploy/': `${path.resolve(process.cwd(), 'src/deploy')}/`,
'@/fixtures/': `${path.resolve(process.cwd(), '__fixtures__')}/`,
'@/gql/': `${path.resolve(process.cwd(), '__generated__/gql')}/`,
'@/input-keys': `${path.resolve(process.cwd(), 'input-keys.ts')}`,
'@/payloads/': `${path.resolve(process.cwd(), '__generated__/payloads')}/`,
'@/responses/': `${path.resolve(process.cwd(), '__generated__/responses')}/`,
'@/tests/': `${path.resolve(process.cwd(), '__tests__')}/`,
'@/types/': `${path.resolve(process.cwd(), '__generated__/types')}/`
}
}
})