union-parity test: the one list-element probe is cast so the test project compiles

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-10-11 04:09:57 +02:00
commit bea5564b3a

View file

@ -321,7 +321,7 @@ test("leaf codecs refuse the wrong shape on both sides, saying what was expected
test("a list element refusal names the element, and nullable writes nil for null and undefined", () => {
const numbers = list(number);
assert.throws(() => numbers.encode([1, "x"]), /^Error: element 1: expected a number, found string$/u);
assert.throws(() => numbers.encode([1, "x" as unknown as number]), /^Error: element 1: expected a number, found string$/u);
assert.throws(() => numbers.decode([1, 2, null]), /^Error: element 2: expected a number, found nil$/u);
const maybe = nullable(number);
assert.equal(maybe.encode(null), null);