mirror of
https://github.com/morluto/rea.git
synced 2026-11-14 18:52:48 +00:00
* test: focus assertions on behavioral evidence Prune redundant and wording-coupled checks while retaining diagnostic, parser, recovery, and cleanup coverage. * refactor: remove test-only wrappers and duplicate checks Exercise production operations through test fixtures, remove unused adapters, and keep managed-member uncertainty guidance under its existing owner. * test: focus process validation on diagnostic facts * refactor: remove test-only runtime helpers Move semantic evidence fixture setup out of runtime and remove unused Windows settle recovery helpers while checking configured defaults independently. * test: focus artifact diagnostics on format facts * test: verify retained cleanup guidance delivery
22 lines
754 B
TypeScript
22 lines
754 B
TypeScript
import { tmpdir } from "node:os";
|
|
import { join } from "node:path";
|
|
|
|
import { expect, it } from "vitest";
|
|
|
|
import { HopperCancelledError } from "../domain/hopperErrors.js";
|
|
import { connectHopperSocketOnce } from "./HopperSocketConnection.js";
|
|
|
|
it("retains the caller abort reason when the socket signal is already aborted", async () => {
|
|
const reason = { source: "caller", opaque: 7 };
|
|
const controller = new AbortController();
|
|
controller.abort(reason);
|
|
const result = await connectHopperSocketOnce(
|
|
join(tmpdir(), "rea-hopper-cancelled.sock"),
|
|
controller.signal,
|
|
);
|
|
|
|
if (result.ok) throw new Error("Expected cancellation");
|
|
expect(result.error).toBeInstanceOf(HopperCancelledError);
|
|
expect(result.error.cause).toBe(reason);
|
|
});
|