forked from ChainSafe/lodestar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vitest.base.unit.config.ts
45 lines (44 loc) · 1.26 KB
/
vitest.base.unit.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
import path from "node:path";
import {defineConfig} from "vitest/config";
const __dirname = new URL(".", import.meta.url).pathname;
export default defineConfig({
test: {
pool: "threads",
include: ["**/*.test.ts"],
exclude: [
"**/*.browser.test.ts",
"**/node_modules/**",
"**/dist/**",
"**/cypress/**",
"**/.{idea,git,cache,output,temp}/**",
"**/{karma,rollup,webpack,vite,vitest,jest,ava,babel,nyc,cypress,tsup,build}.config.*",
],
setupFiles: [
path.join(__dirname, "./scripts/vitest/setupFiles/customMatchers.ts"),
path.join(__dirname, "./scripts/vitest/setupFiles/dotenv.ts"),
],
reporters: process.env.GITHUB_ACTIONS
? ["verbose", "hanging-process", "github-actions"]
: ["verbose", "hanging-process"],
coverage: {
enabled: process.env.CI === "true",
clean: true,
all: false,
extension: [".ts"],
provider: "v8",
reporter: [["lcovonly", {file: "lcov.info"}], ["text"]],
reportsDirectory: "./coverage",
exclude: [
"**/*.d.ts",
"**/*.js",
"**/lib/**",
"**/coverage/**",
"**/scripts/**",
"**/test/**",
"**/types/**",
"**/bin/**",
"**/node_modules/**",
],
},
},
});