forked from ChainSafe/lodestar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vitest.base.unit.config.ts
51 lines (50 loc) · 1.59 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
46
47
48
49
50
51
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: [
"**/spec-tests/**",
"**/spec-tests-bls/**",
"**/*.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"]
: [process.env.TEST_COMPACT_OUTPUT ? "basic" : "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/**",
"**/spec-tests/**",
"**/spec-tests-bls/**",
],
},
diff: process.env.TEST_COMPACT_DIFF ? path.join(import.meta.dirname, "./scripts/vitest/vitest.diff.ts") : undefined,
onConsoleLog: () => !process.env.TEST_QUIET_CONSOLE,
},
});