fix: suppress vitest-pool-workers debug noise and hanging process

- Pre-declare Node.js compatibility flags in miniflare config to
  prevent [vpw:debug] messages during test runs
- Use --no-file-parallelism to fix dangling handle causing
  "close timed out" warning on exit
This commit is contained in:
2026-04-09 11:48:59 +07:00
parent 7949da3734
commit b72e984b0c
2 changed files with 10 additions and 1 deletions

View File

@@ -7,7 +7,7 @@
"scripts": { "scripts": {
"dev": "wrangler dev", "dev": "wrangler dev",
"deploy": "wrangler deploy", "deploy": "wrangler deploy",
"test": "vitest run", "test": "vitest run --no-file-parallelism",
"test:watch": "vitest" "test:watch": "vitest"
}, },
"repository": { "repository": {

View File

@@ -8,6 +8,15 @@ export default defineConfig({
miniflare: { miniflare: {
// Override remote KV with local-only for tests // Override remote KV with local-only for tests
kvNamespaces: ["claude_status"], kvNamespaces: ["claude_status"],
// Pre-add flags so vitest-pool-workers doesn't emit debug noise
compatibilityFlags: [
"enable_nodejs_tty_module",
"enable_nodejs_fs_module",
"enable_nodejs_http_modules",
"enable_nodejs_perf_hooks_module",
"enable_nodejs_v8_module",
"enable_nodejs_process_v2",
],
}, },
}), }),
], ],