syntax errors for `ShadowRealm.evaluate` should be exposed

This commit is contained in:
Phillip Mates 2021-09-13 14:37:19 +02:00 committed by rwaldron
parent aa5c2adb7c
commit ed0532e231
1 changed files with 1 additions and 1 deletions

View File

@ -15,7 +15,7 @@ assert.sameValue(
const r = new ShadowRealm();
assert.throws(TypeError, () => r.evaluate('...'), 'SyntaxError => TypeError');
assert.throws(SyntaxError, () => r.evaluate('...'), 'SyntaxError exposed to Parent');
assert.throws(TypeError, () => r.evaluate('throw 42'), 'throw primitive => TypeError');
assert.throws(TypeError, () => r.evaluate('throw new ReferenceError("aaa")'), 'custom ctor => TypeError');
assert.throws(TypeError, () => r.evaluate('throw new TypeError("aaa")'), 'Child TypeError => Parent TypeError');