-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathvitest.config.js
67 lines (63 loc) · 1.66 KB
/
vitest.config.js
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
65
66
67
import {resolve} from "path"
import { defineConfig } from "vitest/config"
import Vue from "@vitejs/plugin-vue"
export default defineConfig({
plugins: [
Vue(),
],
resolve: {
alias: {
"@": resolve(__dirname, ".", "src"),
components: resolve(__dirname, "src/components/"),
constants: resolve(__dirname, "src/constants/"),
find: /^~/,
img: resolve(__dirname, "assets/img"),
mocks: resolve(__dirname, ".", "tests/__mocks__/"),
services: resolve(__dirname, "src/services/"),
src: resolve(__dirname, "src"),
store: resolve(__dirname, "src/store/"),
styles: resolve(__dirname, "src/assets/styles/"),
svgs: resolve(__dirname, "src/assets/svgs/"),
},
mainFields: ["module"],
//File suffix name that needs to be omitted Note: If an ignored suffix name is configured here, an error will be reported if it is imported with a suffix name
extensions: [".vue", ".js"]
},
root: ".", // Define the root
test: {
globals: true,
environment: "jsdom",
include: [
"tests/**/*.{test,spec,setup}.{js,jsx,ts,tsx}",
],
setupFiles: "./tests/setup/vitest.setup.js",
alias: {
},
coverage: {
reporter: ['text', 'html'],
exclude:
[
'.eslintrc.js',
'babel.config.js',
'vite.config.js',
'vitest.config.js',
'hotel/dist/**',
'dist/**',
'tests/**',
'attic/**',
'src/App.vue',
'src/db.js',
'src/main.js',
'src/components/buttons/login/FacebookLogin.vue',
'src/components/entities/Thermometer.vue',
'src/constants/**',
'src/router/**',
'src/store/**',
'src/utils/firestore.js',
'src/views/Foobar.vue',
'src/views/ThermometerPage.vue',
'**/__mocks__/**',
],
},
},
})