forked from JabRef/JabRefOnline
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvitest.config.ts
29 lines (26 loc) · 842 Bytes
/
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
import { defineVitestConfig } from '@nuxt/test-utils/config'
import GithubActionsReporter from 'vitest-github-actions-reporter'
export default defineVitestConfig({
esbuild: {
tsconfigRaw: {
compilerOptions: {
// Enable decorators, workaround for https://github.com/unjs/nitro/issues/1380
experimentalDecorators: true,
},
},
},
test: {
// Run before each test file
// https://vitest.dev/config/#setupfiles
setupFiles: ['test/global.setup.ts'],
// Code coverage
// https://vitest.dev/config/#coverage and https://vitest.dev/guide/coverage.html
coverage: {
reporter: ['json', 'text'],
},
// Create annotations when tests fail in GitHub Actions
reporters: process.env.GITHUB_ACTIONS
? ['default', new GithubActionsReporter()]
: 'default',
},
})