test fixes: the grey-image schema is a custom check, and the pack probe treats a throwing result as not a reader
Fixes the previous commit (05f9937b, mislabelled wip): its test file did not compile (TS2322) and the pack probe threw on a lazy codec's getters. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
05f9937bbc
commit
d64f688459
1 changed files with 5 additions and 4 deletions
|
|
@ -124,10 +124,11 @@ for (const [entryName, entry] of Object.entries(entries)) {
|
|||
assert.notEqual(value, reader, entryName + " entry exports " + name + " as " + where);
|
||||
}
|
||||
if (typeof value !== "function" || value === cache.decodeDocumentPayload) continue;
|
||||
let returned;
|
||||
try { returned = value(probePayload); } catch { continue; }
|
||||
assert.ok(!JSON.stringify(returned, (_key, member) => (member instanceof Map ? Object.fromEntries(member) : member))?.includes('"probe":7'),
|
||||
entryName + " entry exports " + where + ", which reads a payload without its schema");
|
||||
let shown;
|
||||
try {
|
||||
shown = JSON.stringify(value(probePayload), (_key, member) => (member instanceof Map ? Object.fromEntries(member) : member));
|
||||
} catch { continue; }
|
||||
assert.ok(!shown?.includes('"probe":7'), entryName + " entry exports " + where + ", which reads a payload without its schema");
|
||||
}
|
||||
}
|
||||
assert.equal(typeof documentEntry.checkPayloadDepth, "undefined");
|
||||
|
|
|
|||
Loading…
Reference in a new issue