-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvitest.config.ts
47 lines (46 loc) · 1.21 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
import react from "@vitejs/plugin-react"
import {
coverageConfigDefaults,
defaultExclude,
defineConfig,
mergeConfig,
} from "vitest/config"
import viteConfig from "./vite.config"
export default defineConfig(configEnv =>
mergeConfig(
viteConfig(configEnv),
defineConfig({
plugins: [
react({
babel: {
plugins: [
[
"babel-plugin-transform-react-remove-prop-types",
{ removeImport: true },
],
["macros", { "fontawesome-svg-core": { license: "free" } }],
],
},
}),
],
test: {
unstubGlobals: true,
includeTaskLocation: true,
typecheck: { tsconfig: "tsconfig.json" },
exclude: [...defaultExclude, "src/hooks/loggers", ".yalc"],
globals: true,
coverage: {
exclude: [...coverageConfigDefaults.exclude, "src/hooks/loggers"],
},
environment: "jsdom",
chaiConfig: {
truncateThreshold: 1000,
includeStack: true,
},
reporters: ["verbose", "hanging-process"],
watch: false,
setupFiles: ["src/tests/test-utils/setup.vitest.ts"],
},
}),
),
)