-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.ts
More file actions
28 lines (25 loc) · 849 Bytes
/
vite.config.ts
File metadata and controls
28 lines (25 loc) · 849 Bytes
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
/// <reference types="vitest/config" />
import { defineConfig } from 'vitest/config'
// Use the default timeout amount if no custom value is
// provided in the enviroment variable
const defaultTimeout = 100000;
const initialReadTimeout = typeof process.env.VITEST_TIMEOUT == "string" ?
process.env.VITEST_TIMEOUT : `${defaultTimeout}`;
const parsedNegotiatedTimeout = parseInt(initialReadTimeout, 10);
const finalTimeout = parsedNegotiatedTimeout > 0 ?
parsedNegotiatedTimeout : defaultTimeout;
export default defineConfig({
test: {
testTimeout: finalTimeout,
coverage: {
provider: 'v8',
reporter: ['text', 'json', 'lcov'],
reportsDirectory: './coverage',
include: ['src/**/*.{js,ts}', '!**/node_modules/**']
},
typecheck: {
// Disable typechecking for tests
enabled: false
}
},
});