forked from player-ui/player
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvitest.config.ts
44 lines (39 loc) · 1.02 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
import { configDefaults, defineConfig } from "vitest/config";
import path from "node:path";
export default defineConfig({
test: {
environment: "happy-dom",
exclude: [...configDefaults.exclude, "helpers"],
reporters: [
"default",
process.env.XML_OUTPUT_FILE ? "junit" : "basic",
path.join(__dirname, "tools", "vitest_coverage_mapper.ts"),
],
setupFiles: [
path.join(
process.env.XML_OUTPUT_FILE ? "" : __dirname,
"./scripts/vitest.setup.ts",
),
],
outputFile: {
junit: process.env.XML_OUTPUT_FILE ?? "test-results.xml",
},
passWithNoTests: true,
coverage: {
enabled: Boolean(process.env.COVERAGE_OUTPUT_FILE),
reportOnFailure: true,
provider: "v8",
exclude: [
"**/node_modules/**",
"external/**",
"tools/**",
"**/__tests__/**",
"**/__mocks__/**",
"**/*.d.ts",
"**/*.test.*",
],
all: true,
reporter: ["text", "html", "lcovonly"],
},
},
});