-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvitest.config.ts
More file actions
executable file
·27 lines (26 loc) · 700 Bytes
/
Copy pathvitest.config.ts
File metadata and controls
executable file
·27 lines (26 loc) · 700 Bytes
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
import { defineConfig } from "vitest/config";
import { svelte } from "@sveltejs/vite-plugin-svelte";
import { sveltePreprocess } from "svelte-preprocess";
export default defineConfig({
plugins: [
svelte({
preprocess: sveltePreprocess(),
/* optional: emit CSS as "js" for testing */
// emitCss: false,
compilerOptions: {
dev: true, // better errors in tests
// // hydratable: true,
},
}),
],
test: {
coverage: {
provider: "istanbul",
reporter: ["html", "text", "lcov"],
enabled: true,
include: ["src/**/*.ts"],
},
environment: "happy-dom",
setupFiles: ["./test/fixtures/setup.svelte.ts"],
},
});