perf(test): speed up browser test suites

This commit is contained in:
Peter Steinberger
2026-02-14 14:25:35 +00:00
parent 57f40a5da6
commit 493f6f458b
6 changed files with 242 additions and 248 deletions

View File

@@ -2,6 +2,9 @@ import { afterAll, afterEach, beforeEach, vi } from "vitest";
// Ensure Vitest environment is properly set
process.env.VITEST = "true";
// Config validation walks plugin manifests; keep an aggressive cache in tests to avoid
// repeated filesystem discovery across suites/workers.
process.env.OPENCLAW_PLUGIN_MANIFEST_CACHE_MS ??= "60000";
// Vitest vm forks can load transitive lockfile helpers many times per worker.
// Raise listener budget to avoid noisy MaxListeners warnings and warning-stack overhead.
const TEST_PROCESS_MAX_LISTENERS = 128;