-
-
Notifications
You must be signed in to change notification settings - Fork 82
/
vitest.config.ts
54 lines (52 loc) · 1.31 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
import { defineConfig } from 'vitest/config'
import Vue from '@vitejs/plugin-vue'
import { fileURLToPath, URL } from 'url'
const __dirname = new URL('.', import.meta.url).pathname
export default defineConfig({
resolve: {
alias: [
{
find: 'unplugin-vue-router/runtime',
replacement: fileURLToPath(
new URL('./src/runtime.ts', import.meta.url)
),
},
{
find: 'unplugin-vue-router/data-loaders',
replacement: fileURLToPath(
new URL('./src/data-loaders/entries/index.ts', import.meta.url)
),
},
],
},
plugins: [Vue()],
test: {
setupFiles: ['./tests/router-mock.ts'],
include: ['src/**/*.spec.ts'],
exclude: ['src/**/*.test-d.ts'],
// open: false,
coverage: {
include: ['src/**/*.ts'],
exclude: [
'src/**/*.d.ts',
'src/**/*.test-d.ts',
'src/**/*.spec.ts',
// entry points
'src/index.ts',
'src/esbuild.ts',
'src/rollup.ts',
'src/vite.ts',
'src/webpack.ts',
'src/types.ts',
],
},
typecheck: {
enabled: true,
checker: 'vue-tsc',
// only: true,
// by default it includes all specs too
include: ['src/**/*.test-d.ts'],
// tsconfig: './tsconfig.typecheck.json',
},
},
})