-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvitest.config.ts
More file actions
44 lines (42 loc) · 1.18 KB
/
vitest.config.ts
File metadata and controls
44 lines (42 loc) · 1.18 KB
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
import { defineConfig } from "vitest/config";
import vue from "@vitejs/plugin-vue";
import { fileURLToPath, URL } from "node:url";
import { readFileSync } from "node:fs";
const packageJson = JSON.parse(
readFileSync(new URL("./package.json", import.meta.url), "utf-8")
);
const appVersion = packageJson.version ?? "0.0.0";
const appReleaseTag = `web-app-v${appVersion}`;
export default defineConfig({
plugins: [vue()],
define: {
__APP_VERSION__: JSON.stringify(appVersion),
__APP_RELEASE_TAG__: JSON.stringify(appReleaseTag),
},
resolve: {
alias: {
"@": fileURLToPath(new URL("./src", import.meta.url)),
},
},
test: {
environment: "jsdom",
include: ["tests/components/**/*.test.ts"],
setupFiles: ["./tests/components/setup.ts"],
coverage: {
provider: "istanbul",
reporter: ["text", "json-summary"],
include: [
"src/components/Styling/ThemeSwitch.vue",
"src/components/Styling/TheFooter.vue",
"src/components/Styling/useTheme.ts",
"src/components/PodBrowser.vue",
],
thresholds: {
lines: 70,
statements: 70,
functions: 70,
branches: 60,
},
},
},
});