-
Notifications
You must be signed in to change notification settings - Fork 43
/
Copy pathvitest.config.ts
37 lines (36 loc) · 1.28 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
// eslint-disable-next-line import/no-extraneous-dependencies
import { coverageConfigDefaults, configDefaults, defineConfig } from 'vitest/config';
export default defineConfig({
test: {
coverage: {
exclude: [...coverageConfigDefaults.exclude, '**/dist-gha/**'],
},
// We'll defer to `@oclif/test` for console interception
// so we can run assertions against console output.
disableConsoleIntercept: true,
env: {
/**
* The `chalk` and `colors` libraries have trouble with tests sometimes in test snapshots so
* we're disabling colorization here for all tests.
*
* @see {@link https://github.com/chalk/supports-color/issues/106}
*/
FORCE_COLOR: '0',
/**
* Sets our test `NODE_ENV` to a custom value in case of false positives if someone is using this
* tool in a testing environment.
*/
NODE_ENV: 'rdme-test',
// Node emits ExperimentalWarnings because we import JSON modules, so this hides that output.
NODE_OPTIONS: '--disable-warning=ExperimentalWarning',
},
exclude: [
'**/__fixtures__/**',
'**/dist-gha/**',
'**/helpers/**',
'**/__snapshots__/**',
...configDefaults.exclude,
],
globalSetup: '__tests__/helpers/global-setup.ts',
},
});