-
-
Notifications
You must be signed in to change notification settings - Fork 640
Expand file tree
/
Copy pathvitest.config.ts
More file actions
29 lines (28 loc) · 1.05 KB
/
Copy pathvitest.config.ts
File metadata and controls
29 lines (28 loc) · 1.05 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
import react from "@vitejs/plugin-react"
import { configDefaults, defineConfig } from "vitest/config"
import { WxtVitest } from "wxt/testing/vitest-plugin"
export default defineConfig({
// TODO: remove any
plugins: [WxtVitest() as any, react()],
test: {
exclude: [...configDefaults.exclude, "**/.claude/**", "**/repos/**"],
environment: "node",
environmentOptions: {
// jsdom defaults to http://localhost:3000/, which built-in site rules
// keyed on localhost (e.g. sillytavern) silently match — tests written
// on the default URL would run under that site's semantics instead of
// the shipped defaults. Pin a neutral host no rule matches; per-file
// @vitest-environment-options pragmas still override this.
jsdom: { url: "https://neutral-test.example/" },
},
globals: true,
setupFiles: "vitest.setup.ts",
watch: false,
coverage: {
provider: "istanbul",
reporter: ["text", "html", "lcov"],
// include: ['src/**/*.{ts,tsx}'],
// exclude: ['src/**/*.spec.ts']
},
},
})