power loss

This commit is contained in:
Andras Schmelczer 2026-09-21 21:29:52 +01:00
commit d56084e4bc

View file

@ -0,0 +1,15 @@
import assert from "node:assert/strict";
import { test } from "node:test";
import { spawnSync } from "node:child_process";
import { resolve } from "node:path";
test("a status observer exception must not terminate a background sync process", () => {
const result = spawnSync(
process.execPath,
[
resolve(__dirname, "../node_modules/tsx/dist/cli.mjs"),
resolve(__dirname, "listener-crash-child.ts")
],
{ encoding: "utf8", timeout: 10000 }
);
assert.equal(result.status, 0, result.stderr);
});