cultcache-ts test: the plain-document write refusal names its document type (kills the Stryker survivor on the encode subject)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
986faf1f33
commit
0451e4afc1
1 changed files with 2 additions and 1 deletions
|
|
@ -164,7 +164,8 @@ test("a document without a codec or formatter writes a value L deep and refuses
|
|||
assert.deepEqual(documentPayloadBytes(atLimit), encode(nest(L), { maxDepth: 1000 }));
|
||||
assert.deepEqual(decodeDocumentPayload(anything, atLimit), nest(L));
|
||||
assert.throws(() => encodeDocumentPayload(anything, nest(L + 1)), (error: unknown) =>
|
||||
error instanceof CultCachePayloadDepthError && error.depth === L + 1 && error.limit === L);
|
||||
error instanceof CultCachePayloadDepthError && error.depth === L + 1 && error.limit === L
|
||||
&& error.message === 'document type "t.any" value nests 257 MessagePack containers deep; the limit is 256.');
|
||||
assert.throws(() => decodeDocumentPayload(anything, documentPayloadFromBytes(arrays(L + 1))), CultCachePayloadDepthError);
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue