test: dedupe line signature mock read

This commit is contained in:
Peter Steinberger
2026-05-13 09:48:41 +01:00
parent c1700a5c9f
commit 898a5aae21

View File

@@ -26,7 +26,7 @@ describe("validateLineSignature", () => {
expect(validateLineSignature(body, "short", secret)).toBe(false);
expect(spy).toHaveBeenCalledTimes(1);
const [left, right] = spy.mock.calls.at(0) ?? [];
const [left, right] = spy.mock.calls[0] ?? [];
expect(left).toBeInstanceOf(Buffer);
expect(right).toBeInstanceOf(Buffer);
expect(left?.byteLength).toBe(right?.byteLength);