-
-
Notifications
You must be signed in to change notification settings - Fork 375
/
vitest.config.ts
64 lines (60 loc) · 1.41 KB
/
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
import { existsSync } from 'node:fs'
import { fileURLToPath } from 'node:url'
import tsconfigPaths from 'vite-tsconfig-paths'
import { defineConfig } from 'vitest/config'
import { wasmPlugin } from './packages/core/rollup.config.mjs'
const localOnigurumaToJs = fileURLToPath(new URL('../oniguruma-to-js/src/index.ts', import.meta.url))
export default defineConfig({
resolve: {
alias: {
// For local developement
...existsSync(localOnigurumaToJs)
? {
'oniguruma-to-js': localOnigurumaToJs,
}
: {},
},
},
plugins: [
wasmPlugin(),
tsconfigPaths(),
],
test: {
exclude: [
'**/vendor/**',
'**/node_modules/**',
],
server: {
deps: {
inline: [
/\.wasm/,
],
},
},
coverage: {
provider: 'v8',
include: [
'**/packages/*/src/**/*.ts',
],
exclude: [
'**/node_modules/**',
'**/dist/**',
'**/scripts/**',
// Vendored code
'packages/engine-oniguruma/src/oniguruma/onig.ts',
'**/src/langs/**',
'**/src/themes/**',
'**/wasm-inlined.ts',
// Integration packages that are hard to cover, or tested elsewhere
'packages/cli/**',
'packages/monaco/**',
'packages/vitepress-twoslash/**',
],
},
poolOptions: {
threads: {
singleThread: true,
},
},
},
})