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:
@@ -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), [])
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user