Files
rea/tests/fixtures/processSnapshotCancellation.mjs
T
morluto 93aa9eb5c2 fix(process): harden filesystem snapshot identity and cancellation (#956)
* fix(process): bind snapshots to captured file identity

* fix(process): honor snapshot cancellation for empty files

* test(process): verify snapshot descriptor cleanup

* fix(process): preserve snapshot cancellation results

* fix(process): preserve non-cancellation capture failures

* test(process): verify descriptor cleanup with fstat

* fix(process): detect snapshot changes by ctime

* test(process): prove snapshot ctime invalidation
2026-10-07 23:45:23 +08:00

9 lines
282 B
JavaScript

import { writeFile } from "node:fs/promises";
import { join } from "node:path";
const [root] = process.argv.slice(2);
if (root === undefined)
throw new Error("Snapshot cancellation fixture requires an observation root");
await writeFile(join(root, "created-after-start"), "x");