-
Notifications
You must be signed in to change notification settings - Fork 0
/
vitest.config.ts
46 lines (45 loc) · 1.22 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
/// <reference types="vitest" />
import { defineConfig, coverageConfigDefaults } from "vitest/config";
import Vue from "@vitejs/plugin-vue";
import Icons from "unplugin-icons/vite";
import allAlias from "./alias.ts";
export default defineConfig({
plugins: [
Vue({
script: {
propsDestructure: true,
},
}),
Icons({
iconCustomizer(collection, icon, props) {
// customize all icons in this collection
if (collection === "tabler" || collection === "lucide") {
props.width = "24";
props.height = "24";
}
},
}), // chooses the compiler automatically
],
test: {
include: ["src/tests/unit/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}"],
exclude: ["src/tests/unit/__needsFix/*"],
globals: true,
environment: "jsdom",
setupFiles: ["src/tests/setup.ts", "@vitest/web-worker"],
coverage: {
include: ["src/**"],
exclude: [
"src/types/**",
"src/env.d.ts",
"src/pages/_app.ts",
"src/plugins/**",
"src/utils/supportedBrowsers.mjs",
...coverageConfigDefaults.exclude,
],
reportsDirectory: "./tests/unit/coverage",
},
},
resolve: {
alias: allAlias,
},
});