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:
parent
9073d582e7
commit
bea5564b3a
1 changed files with 1 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue