-
Notifications
You must be signed in to change notification settings - Fork 181
Expand file tree
/
Copy pathvitest.unit.config.ts
More file actions
34 lines (32 loc) · 1.16 KB
/
vitest.unit.config.ts
File metadata and controls
34 lines (32 loc) · 1.16 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
import { dirname, resolve } from "node:path";
import { fileURLToPath } from "node:url";
import { defineConfig } from "vitest/config";
const __dirname = dirname(fileURLToPath(import.meta.url));
export default defineConfig({
test: {
globals: true,
include: ["src/**/*.test.ts"],
exclude: [
"**/node_modules/**",
"**/dist/**",
"**/comparison-tests/**",
"**/python3/**",
"**/sqlite3/**",
"**/js-exec/**",
"**/python-scripting*",
],
setupFiles: [resolve(__dirname, "src/vitest-setup.ts")],
// Tests that patch globalThis (defense-in-depth) or spawn workers need
// process-level isolation so they don't leak state into thread neighbours.
poolMatchGlobs: [
["forks", "**/security/attacks/**"],
["forks", "**/security/defense-in-depth-box*.test.ts"],
["forks", "**/security/defense-in-depth-hardening.test.ts"],
["forks", "**/security/sandbox/**"],
["forks", "**/sqlite3.worker-protocol-abuse.test.ts"],
["forks", "**/python3.worker-protocol-abuse.test.ts"],
["forks", "**/python3.queue-desync.runtime.test.ts"],
["forks", "**/wasm-callback.test.ts"],
],
},
});