mirror of
https://github.com/larvit/adf-codec.git
synced 2026-11-19 14:45:44 +01:00
Answer architecture round 1: the guard refuses only the measured overflow errors, the README keeps such a document read-only, and items 106 and 107 take the heap and the carry's indentation
This commit is contained in:
+6
-1
@@ -32,7 +32,7 @@ test('every ConvertErrorCode is the code of a production call site, and every ca
|
||||
assert.deepEqual(calledCodes(), declaredCodes())
|
||||
})
|
||||
|
||||
test('refuses where SpiderMonkey runs out of string, and lets any other throw through', () => {
|
||||
test('refuses where SpiderMonkey runs out of string, and lets a stack overflow or any other throw through', () => {
|
||||
const overflow = new Error('allocation size overflow')
|
||||
overflow.name = 'InternalError'
|
||||
assert.deepEqual(
|
||||
@@ -41,6 +41,11 @@ test('refuses where SpiderMonkey runs out of string, and lets any other throw th
|
||||
}),
|
||||
{ error: { code: 'unsupported-node-shape', message: 'the output runs past what this JavaScript engine holds: allocation size overflow', path: [] }, ok: false },
|
||||
)
|
||||
assert.throws(() =>
|
||||
withinEngineLimits(() => {
|
||||
throw new RangeError('Maximum call stack size exceeded')
|
||||
}),
|
||||
)
|
||||
assert.throws(() =>
|
||||
withinEngineLimits(() => {
|
||||
throw new TypeError('a bug')
|
||||
|
||||
Reference in New Issue
Block a user