3
0
mirror of https://github.com/larvit/adf-codec.git synced 2026-11-13 12:18:28 +01:00

Answer stability round 1: the docs name V8's array limit in one text node, a test pins Invalid array length, and item 106 takes the readers' RangeError and JavaScriptCore's Out of memory

This commit is contained in:
2026-10-11 20:51:21 +02:00
committed by Lillem4n
parent edacef410f
commit 80b4e0a9b7
7 changed files with 29 additions and 13 deletions
+1 -1
View File
@@ -49,7 +49,7 @@ test('refuses a document whose markdown runs past the engine\'s longest string',
let value: JsonValue = new Array<JsonValue>(2_200_000).fill(0)
for (let level = 0; level < 495; level += 1) value = [value]
const result = adfToLosslessMarkdown(document({ attrs: { value }, type: 'unknownBlock' }))
assert.match(markdown(result), /^unsupported-node-shape: the output runs past what this JavaScript engine holds: /)
assert.match(markdown(result), /^unsupported-node-shape: the output would be longer than the longest string or array this JavaScript engine builds \(/)
assert.deepEqual(path(result), [])
})