A node:fs function handed as-is to an asynchronous mechanism (process.nextTick(writeFileSync, ...), a bound listener, a .then) runs with no runtime frame on its stack, so the stack filter let the write through on a path the suite does exercise. The spies now record every call. The test's own fixture edits go through the real functions captured before any spy exists. The recursive rmSync of the reports directory becomes a rename: rmSync recurses through the public fs.rmdirSync, which is the spy by then. Fixes #40 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| agent.test.js | ||
| auth.test.js | ||
| ci.test.js | ||
| findings.test.js | ||
| health.test.js | ||
| hosts.test.js | ||
| state.test.js | ||
| writes.test.js | ||