-
Notifications
You must be signed in to change notification settings - Fork 0
/
vitest.root.ts
35 lines (31 loc) · 1.01 KB
/
vitest.root.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
import GithubActionsReporter from "vitest-github-actions-reporter";
import { coverageConfigDefaults, defineConfig } from "vitest/config";
// load region from config to prevent error "ConfigError: Missing region in config"
// https://github.com/aws/aws-sdk-js/pull/1391
// process.env.AWS_SDK_LOAD_CONFIG = "1";
export default defineConfig({
test: {
// https://github.com/sapphi-red/vitest-github-actions-reporter
reporters: process.env.GITHUB_ACTIONS
? ["default", new GithubActionsReporter()]
: "default",
// https://vitest.dev/config/#typecheck
typecheck: {
enabled: true,
ignoreSourceErrors: false,
},
// https://vitest.dev/guide/coverage.html
coverage: {
provider: "v8",
// json-summary is required for https://github.com/davelosert/vitest-coverage-report-action
reporter: ["json-summary", "json", "text-summary"],
thresholds: {
lines: 80,
statements: 80,
functions: 80,
branches: 80,
},
exclude: ["**/examples/**", ...coverageConfigDefaults.exclude],
},
},
});