// Warm the shared Nim build cache before a test file fans out. // // node --test runs every test *file* in its own process; with --test-concurrency > 1 several files // start at once. lib.mjs cachedNimBuild already makes them share one build per variant, but the // first file to ask pays the compiler while the others wait on the lock. This script builds the // three server variants the harnesses use plus (for the server gate) the leak checker, once, // before the suite starts. `server-only` is for the client e2e: it launches the server but never // builds the checker. It is a pure cache warm-up: a test file still builds anything missing when // run on its own. import { buildChecker } from './leak.mjs' import { buildServer } from './withserver.mjs' buildServer() buildServer({ defines: ['leakfault'] }) buildServer({ defines: ['dispfault'] }) if (!process.argv.includes('server-only')) buildChecker()