From 44dbf413627ab18ffc0d24ba733f1731b655f3e6 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sun, 11 Oct 2026 08:39:42 +0200 Subject: [PATCH] union-parity test: the unknown-arm payload is one array, not two values Co-Authored-By: Claude Opus 5.5 --- packages/cultcache-ts/test/union-parity.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/cultcache-ts/test/union-parity.test.ts b/packages/cultcache-ts/test/union-parity.test.ts index 2b4d4dfc..69727b8f 100644 --- a/packages/cultcache-ts/test/union-parity.test.ts +++ b/packages/cultcache-ts/test/union-parity.test.ts @@ -670,7 +670,7 @@ test("arm keys span Int32 and are listed ascending; slot keys are non-negative I assert.deepEqual(written, [key, []]); assert.deepEqual(keys.decode(readWire(writeWire(written))), { kind }); } - assert.throws(() => keys.decode(readWire(fromHex("92059090"))), { message: "Union U: unknown arm key 5 (declared keys: -2147483648, -1, 0, 2147483647)." }); + assert.throws(() => keys.decode(readWire(fromHex("920590"))), { message: "Union U: unknown arm key 5 (declared keys: -2147483648, -1, 0, 2147483647)." }); assert.throws(() => union<{ kind: "A" }>("U", { [-2147483649]: ["A", unit] }), { message: "Union U declares the key -2147483649, which is outside Int32." }); assert.throws(() => union<{ kind: "A" }>("U", { 99999999999999999999: ["A", unit] } as never), { message: "Union U declares the key 100000000000000000000, which is outside Int32." }); assert.doesNotThrow(() => slots<{ a: string }>({ 2147483647: ["a", string] }));