test: dedupe daemon service mock read

This commit is contained in:
Peter Steinberger
2026-05-13 05:44:49 +01:00
parent 1eeec9e183
commit 7f8ce2dfd6

View File

@@ -37,7 +37,7 @@ function createGatewayParentLikeCommand() {
function expectSingleDaemonCall(mockFn: ReturnType<typeof vi.fn>) {
expect(mockFn).toHaveBeenCalledTimes(1);
const opts = mockFn.mock.calls.at(0)?.[0] as Record<string, unknown> | undefined;
const opts = mockFn.mock.calls[0]?.[0] as Record<string, unknown> | undefined;
if (opts === undefined) {
throw new Error("expected daemon call options");
}