-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathvitest.config.js
More file actions
46 lines (45 loc) · 1.08 KB
/
vitest.config.js
File metadata and controls
46 lines (45 loc) · 1.08 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
45
46
import { defineConfig } from "vitest/config";
import { sveltekit } from "@sveltejs/kit/vite";
export default defineConfig({
plugins: [sveltekit()],
test: {
include: ["src/**/*.{test,spec}.{js,ts}"],
environment: "jsdom",
setupFiles: ["./src/tests/setup.js"],
globals: true,
coverage: {
provider: "v8",
reporter: ["text", "json", "html", "lcov"],
exclude: [
"node_modules/",
"src/tests/",
"build/",
".svelte-kit/",
"static/",
"scripts/",
"docs/",
"**/*.config.js",
"**/*.config.ts",
"src/app.html",
"src/lib/typesense.server.js", // Server-only modules
],
thresholds: {
global: {
branches: 70,
functions: 70,
lines: 70,
statements: 70,
},
},
},
// Mock server-only modules to prevent import errors during testing
alias: {
"$env/dynamic/private": "./src/tests/mocks/env.js",
},
server: {
deps: {
inline: ["@testing-library/svelte"],
},
},
},
});