// Child process for the SIGKILL tests. argv: SRC_DIR STEP REQUEST_JSON. // Runs one mutation from the working directory and kills itself with // SIGKILL when the write path reaches STEP (8.5). import { join } from "node:path"; import { pathToFileURL } from "node:url"; const [src, step, json] = process.argv.slice(2); const store = await import(pathToFileURL(join(src, "store.mjs")).href); store.mutate({ hook: (name) => { if (name === step) process.kill(process.pid, "SIGKILL"); } }, JSON.parse(json)); process.stdout.write("finished without reaching the step\n");