mirror of
https://github.com/tc39/test262.git
synced 2025-07-23 22:15:24 +02:00
[source-phase-imports] update missing source error type
This commit is contained in:
parent
0add42b556
commit
3f0a24f4f6
@ -7,7 +7,7 @@ esid: sec-moduleevaluation
|
||||
info: |
|
||||
16.2.1.7.2 GetModuleSource ( )
|
||||
Source Text Module Record provides a GetModuleSource implementation that always returns an abrupt completion indicating that a source phase import is not available.
|
||||
1. Throw a ReferenceError exception.
|
||||
1. Throw a SyntaxError exception.
|
||||
|
||||
Import Calls
|
||||
|
||||
@ -35,4 +35,4 @@ features: [source-phase-imports]
|
||||
//- import
|
||||
import.source('./empty_FIXTURE.js')
|
||||
//- body
|
||||
assert.sameValue(error.name, 'ReferenceError');
|
||||
assert.sameValue(error.name, 'SyntaxError');
|
||||
|
@ -28,7 +28,7 @@ info: |
|
||||
|
||||
16.2.1.7.2 GetModuleSource ( )
|
||||
Source Text Module Record provides a GetModuleSource implementation that always returns an abrupt completion indicating that a source phase import is not available.
|
||||
1. Throw a ReferenceError exception.
|
||||
1. Throw a SyntaxError exception.
|
||||
|
||||
template: catch
|
||||
features: [source-phase-imports]
|
||||
@ -47,4 +47,4 @@ const obj = {
|
||||
//- import
|
||||
import.source(obj)
|
||||
//- body
|
||||
assert.sameValue(error.name, 'ReferenceError');
|
||||
assert.sameValue(error.name, 'SyntaxError');
|
||||
|
@ -23,7 +23,7 @@ info: |
|
||||
|
||||
16.2.1.7.2 GetModuleSource ( )
|
||||
Source Text Module Record provides a GetModuleSource implementation that always returns an abrupt completion indicating that a source phase import is not available.
|
||||
1. Throw a ReferenceError exception.
|
||||
1. Throw a SyntaxError exception.
|
||||
|
||||
Import Calls
|
||||
|
||||
@ -49,7 +49,7 @@ info: |
|
||||
let f = () => {
|
||||
import.source('./empty_FIXTURE.js').catch(error => {
|
||||
|
||||
assert.sameValue(error.name, 'ReferenceError');
|
||||
assert.sameValue(error.name, 'SyntaxError');
|
||||
|
||||
}).then($DONE, $DONE);
|
||||
};
|
||||
|
@ -42,7 +42,7 @@ info: |
|
||||
|
||||
16.2.1.7.2 GetModuleSource ( )
|
||||
Source Text Module Record provides a GetModuleSource implementation that always returns an abrupt completion indicating that a source phase import is not available.
|
||||
1. Throw a ReferenceError exception.
|
||||
1. Throw a SyntaxError exception.
|
||||
|
||||
---*/
|
||||
// The following case is equivalent of the call of:
|
||||
@ -58,7 +58,7 @@ const obj = {
|
||||
let f = () => {
|
||||
import.source(obj).catch(error => {
|
||||
|
||||
assert.sameValue(error.name, 'ReferenceError');
|
||||
assert.sameValue(error.name, 'SyntaxError');
|
||||
|
||||
}).then($DONE, $DONE);
|
||||
};
|
||||
|
@ -23,7 +23,7 @@ info: |
|
||||
|
||||
16.2.1.7.2 GetModuleSource ( )
|
||||
Source Text Module Record provides a GetModuleSource implementation that always returns an abrupt completion indicating that a source phase import is not available.
|
||||
1. Throw a ReferenceError exception.
|
||||
1. Throw a SyntaxError exception.
|
||||
|
||||
Import Calls
|
||||
|
||||
@ -52,6 +52,6 @@ const f = async () => {
|
||||
|
||||
f().catch(error => {
|
||||
|
||||
assert.sameValue(error.name, 'ReferenceError');
|
||||
assert.sameValue(error.name, 'SyntaxError');
|
||||
|
||||
}).then($DONE, $DONE);
|
||||
|
@ -42,7 +42,7 @@ info: |
|
||||
|
||||
16.2.1.7.2 GetModuleSource ( )
|
||||
Source Text Module Record provides a GetModuleSource implementation that always returns an abrupt completion indicating that a source phase import is not available.
|
||||
1. Throw a ReferenceError exception.
|
||||
1. Throw a SyntaxError exception.
|
||||
|
||||
---*/
|
||||
// The following case is equivalent of the call of:
|
||||
@ -61,6 +61,6 @@ const f = async () => {
|
||||
|
||||
f().catch(error => {
|
||||
|
||||
assert.sameValue(error.name, 'ReferenceError');
|
||||
assert.sameValue(error.name, 'SyntaxError');
|
||||
|
||||
}).then($DONE, $DONE);
|
||||
|
@ -23,7 +23,7 @@ info: |
|
||||
|
||||
16.2.1.7.2 GetModuleSource ( )
|
||||
Source Text Module Record provides a GetModuleSource implementation that always returns an abrupt completion indicating that a source phase import is not available.
|
||||
1. Throw a ReferenceError exception.
|
||||
1. Throw a SyntaxError exception.
|
||||
|
||||
Import Calls
|
||||
|
||||
@ -50,6 +50,6 @@ const f = async () => await import.source('./empty_FIXTURE.js');
|
||||
|
||||
f().catch(error => {
|
||||
|
||||
assert.sameValue(error.name, 'ReferenceError');
|
||||
assert.sameValue(error.name, 'SyntaxError');
|
||||
|
||||
}).then($DONE, $DONE);
|
||||
|
@ -42,7 +42,7 @@ info: |
|
||||
|
||||
16.2.1.7.2 GetModuleSource ( )
|
||||
Source Text Module Record provides a GetModuleSource implementation that always returns an abrupt completion indicating that a source phase import is not available.
|
||||
1. Throw a ReferenceError exception.
|
||||
1. Throw a SyntaxError exception.
|
||||
|
||||
---*/
|
||||
// The following case is equivalent of the call of:
|
||||
@ -59,6 +59,6 @@ const f = async () => await import.source(obj);
|
||||
|
||||
f().catch(error => {
|
||||
|
||||
assert.sameValue(error.name, 'ReferenceError');
|
||||
assert.sameValue(error.name, 'SyntaxError');
|
||||
|
||||
}).then($DONE, $DONE);
|
||||
|
@ -23,7 +23,7 @@ info: |
|
||||
|
||||
16.2.1.7.2 GetModuleSource ( )
|
||||
Source Text Module Record provides a GetModuleSource implementation that always returns an abrupt completion indicating that a source phase import is not available.
|
||||
1. Throw a ReferenceError exception.
|
||||
1. Throw a SyntaxError exception.
|
||||
|
||||
Import Calls
|
||||
|
||||
@ -49,7 +49,7 @@ info: |
|
||||
async function f() {
|
||||
await import.source('./empty_FIXTURE.js').catch(error => {
|
||||
|
||||
assert.sameValue(error.name, 'ReferenceError');
|
||||
assert.sameValue(error.name, 'SyntaxError');
|
||||
|
||||
}).then($DONE, $DONE);
|
||||
}
|
||||
|
@ -42,7 +42,7 @@ info: |
|
||||
|
||||
16.2.1.7.2 GetModuleSource ( )
|
||||
Source Text Module Record provides a GetModuleSource implementation that always returns an abrupt completion indicating that a source phase import is not available.
|
||||
1. Throw a ReferenceError exception.
|
||||
1. Throw a SyntaxError exception.
|
||||
|
||||
---*/
|
||||
// The following case is equivalent of the call of:
|
||||
@ -58,7 +58,7 @@ const obj = {
|
||||
async function f() {
|
||||
await import.source(obj).catch(error => {
|
||||
|
||||
assert.sameValue(error.name, 'ReferenceError');
|
||||
assert.sameValue(error.name, 'SyntaxError');
|
||||
|
||||
}).then($DONE, $DONE);
|
||||
}
|
||||
|
@ -23,7 +23,7 @@ info: |
|
||||
|
||||
16.2.1.7.2 GetModuleSource ( )
|
||||
Source Text Module Record provides a GetModuleSource implementation that always returns an abrupt completion indicating that a source phase import is not available.
|
||||
1. Throw a ReferenceError exception.
|
||||
1. Throw a SyntaxError exception.
|
||||
|
||||
Import Calls
|
||||
|
||||
@ -49,7 +49,7 @@ info: |
|
||||
async function f() {
|
||||
import.source('./empty_FIXTURE.js').catch(error => {
|
||||
|
||||
assert.sameValue(error.name, 'ReferenceError');
|
||||
assert.sameValue(error.name, 'SyntaxError');
|
||||
|
||||
}).then($DONE, $DONE);
|
||||
}
|
||||
|
@ -42,7 +42,7 @@ info: |
|
||||
|
||||
16.2.1.7.2 GetModuleSource ( )
|
||||
Source Text Module Record provides a GetModuleSource implementation that always returns an abrupt completion indicating that a source phase import is not available.
|
||||
1. Throw a ReferenceError exception.
|
||||
1. Throw a SyntaxError exception.
|
||||
|
||||
---*/
|
||||
// The following case is equivalent of the call of:
|
||||
@ -58,7 +58,7 @@ const obj = {
|
||||
async function f() {
|
||||
import.source(obj).catch(error => {
|
||||
|
||||
assert.sameValue(error.name, 'ReferenceError');
|
||||
assert.sameValue(error.name, 'SyntaxError');
|
||||
|
||||
}).then($DONE, $DONE);
|
||||
}
|
||||
|
@ -23,7 +23,7 @@ info: |
|
||||
|
||||
16.2.1.7.2 GetModuleSource ( )
|
||||
Source Text Module Record provides a GetModuleSource implementation that always returns an abrupt completion indicating that a source phase import is not available.
|
||||
1. Throw a ReferenceError exception.
|
||||
1. Throw a SyntaxError exception.
|
||||
|
||||
Import Calls
|
||||
|
||||
@ -49,7 +49,7 @@ info: |
|
||||
async function f() {
|
||||
return await import.source('./empty_FIXTURE.js').catch(error => {
|
||||
|
||||
assert.sameValue(error.name, 'ReferenceError');
|
||||
assert.sameValue(error.name, 'SyntaxError');
|
||||
|
||||
}).then($DONE, $DONE);
|
||||
}
|
||||
|
@ -42,7 +42,7 @@ info: |
|
||||
|
||||
16.2.1.7.2 GetModuleSource ( )
|
||||
Source Text Module Record provides a GetModuleSource implementation that always returns an abrupt completion indicating that a source phase import is not available.
|
||||
1. Throw a ReferenceError exception.
|
||||
1. Throw a SyntaxError exception.
|
||||
|
||||
---*/
|
||||
// The following case is equivalent of the call of:
|
||||
@ -58,7 +58,7 @@ const obj = {
|
||||
async function f() {
|
||||
return await import.source(obj).catch(error => {
|
||||
|
||||
assert.sameValue(error.name, 'ReferenceError');
|
||||
assert.sameValue(error.name, 'SyntaxError');
|
||||
|
||||
}).then($DONE, $DONE);
|
||||
}
|
||||
|
@ -23,7 +23,7 @@ info: |
|
||||
|
||||
16.2.1.7.2 GetModuleSource ( )
|
||||
Source Text Module Record provides a GetModuleSource implementation that always returns an abrupt completion indicating that a source phase import is not available.
|
||||
1. Throw a ReferenceError exception.
|
||||
1. Throw a SyntaxError exception.
|
||||
|
||||
Import Calls
|
||||
|
||||
@ -52,6 +52,6 @@ async function * f() {
|
||||
|
||||
f().next().catch(error => {
|
||||
|
||||
assert.sameValue(error.name, 'ReferenceError');
|
||||
assert.sameValue(error.name, 'SyntaxError');
|
||||
|
||||
}).then($DONE, $DONE);
|
||||
|
@ -42,7 +42,7 @@ info: |
|
||||
|
||||
16.2.1.7.2 GetModuleSource ( )
|
||||
Source Text Module Record provides a GetModuleSource implementation that always returns an abrupt completion indicating that a source phase import is not available.
|
||||
1. Throw a ReferenceError exception.
|
||||
1. Throw a SyntaxError exception.
|
||||
|
||||
---*/
|
||||
// The following case is equivalent of the call of:
|
||||
@ -61,6 +61,6 @@ async function * f() {
|
||||
|
||||
f().next().catch(error => {
|
||||
|
||||
assert.sameValue(error.name, 'ReferenceError');
|
||||
assert.sameValue(error.name, 'SyntaxError');
|
||||
|
||||
}).then($DONE, $DONE);
|
||||
|
@ -23,7 +23,7 @@ info: |
|
||||
|
||||
16.2.1.7.2 GetModuleSource ( )
|
||||
Source Text Module Record provides a GetModuleSource implementation that always returns an abrupt completion indicating that a source phase import is not available.
|
||||
1. Throw a ReferenceError exception.
|
||||
1. Throw a SyntaxError exception.
|
||||
|
||||
Import Calls
|
||||
|
||||
@ -52,6 +52,6 @@ async function * f() {
|
||||
|
||||
f().next().catch(error => {
|
||||
|
||||
assert.sameValue(error.name, 'ReferenceError');
|
||||
assert.sameValue(error.name, 'SyntaxError');
|
||||
|
||||
}).then($DONE, $DONE);
|
||||
|
@ -42,7 +42,7 @@ info: |
|
||||
|
||||
16.2.1.7.2 GetModuleSource ( )
|
||||
Source Text Module Record provides a GetModuleSource implementation that always returns an abrupt completion indicating that a source phase import is not available.
|
||||
1. Throw a ReferenceError exception.
|
||||
1. Throw a SyntaxError exception.
|
||||
|
||||
---*/
|
||||
// The following case is equivalent of the call of:
|
||||
@ -61,6 +61,6 @@ async function * f() {
|
||||
|
||||
f().next().catch(error => {
|
||||
|
||||
assert.sameValue(error.name, 'ReferenceError');
|
||||
assert.sameValue(error.name, 'SyntaxError');
|
||||
|
||||
}).then($DONE, $DONE);
|
||||
|
@ -23,7 +23,7 @@ info: |
|
||||
|
||||
16.2.1.7.2 GetModuleSource ( )
|
||||
Source Text Module Record provides a GetModuleSource implementation that always returns an abrupt completion indicating that a source phase import is not available.
|
||||
1. Throw a ReferenceError exception.
|
||||
1. Throw a SyntaxError exception.
|
||||
|
||||
Import Calls
|
||||
|
||||
@ -49,7 +49,7 @@ info: |
|
||||
{
|
||||
import.source('./empty_FIXTURE.js').catch(error => {
|
||||
|
||||
assert.sameValue(error.name, 'ReferenceError');
|
||||
assert.sameValue(error.name, 'SyntaxError');
|
||||
|
||||
}).then($DONE, $DONE);
|
||||
};
|
||||
|
@ -42,7 +42,7 @@ info: |
|
||||
|
||||
16.2.1.7.2 GetModuleSource ( )
|
||||
Source Text Module Record provides a GetModuleSource implementation that always returns an abrupt completion indicating that a source phase import is not available.
|
||||
1. Throw a ReferenceError exception.
|
||||
1. Throw a SyntaxError exception.
|
||||
|
||||
---*/
|
||||
// The following case is equivalent of the call of:
|
||||
@ -58,7 +58,7 @@ const obj = {
|
||||
{
|
||||
import.source(obj).catch(error => {
|
||||
|
||||
assert.sameValue(error.name, 'ReferenceError');
|
||||
assert.sameValue(error.name, 'SyntaxError');
|
||||
|
||||
}).then($DONE, $DONE);
|
||||
};
|
||||
|
@ -23,7 +23,7 @@ info: |
|
||||
|
||||
16.2.1.7.2 GetModuleSource ( )
|
||||
Source Text Module Record provides a GetModuleSource implementation that always returns an abrupt completion indicating that a source phase import is not available.
|
||||
1. Throw a ReferenceError exception.
|
||||
1. Throw a SyntaxError exception.
|
||||
|
||||
Import Calls
|
||||
|
||||
@ -49,7 +49,7 @@ info: |
|
||||
label: {
|
||||
import.source('./empty_FIXTURE.js').catch(error => {
|
||||
|
||||
assert.sameValue(error.name, 'ReferenceError');
|
||||
assert.sameValue(error.name, 'SyntaxError');
|
||||
|
||||
}).then($DONE, $DONE);
|
||||
};
|
||||
|
@ -42,7 +42,7 @@ info: |
|
||||
|
||||
16.2.1.7.2 GetModuleSource ( )
|
||||
Source Text Module Record provides a GetModuleSource implementation that always returns an abrupt completion indicating that a source phase import is not available.
|
||||
1. Throw a ReferenceError exception.
|
||||
1. Throw a SyntaxError exception.
|
||||
|
||||
---*/
|
||||
// The following case is equivalent of the call of:
|
||||
@ -58,7 +58,7 @@ const obj = {
|
||||
label: {
|
||||
import.source(obj).catch(error => {
|
||||
|
||||
assert.sameValue(error.name, 'ReferenceError');
|
||||
assert.sameValue(error.name, 'SyntaxError');
|
||||
|
||||
}).then($DONE, $DONE);
|
||||
};
|
||||
|
@ -23,7 +23,7 @@ info: |
|
||||
|
||||
16.2.1.7.2 GetModuleSource ( )
|
||||
Source Text Module Record provides a GetModuleSource implementation that always returns an abrupt completion indicating that a source phase import is not available.
|
||||
1. Throw a ReferenceError exception.
|
||||
1. Throw a SyntaxError exception.
|
||||
|
||||
Import Calls
|
||||
|
||||
@ -49,7 +49,7 @@ info: |
|
||||
do {
|
||||
import.source('./empty_FIXTURE.js').catch(error => {
|
||||
|
||||
assert.sameValue(error.name, 'ReferenceError');
|
||||
assert.sameValue(error.name, 'SyntaxError');
|
||||
|
||||
}).then($DONE, $DONE);
|
||||
} while (false);
|
||||
|
@ -42,7 +42,7 @@ info: |
|
||||
|
||||
16.2.1.7.2 GetModuleSource ( )
|
||||
Source Text Module Record provides a GetModuleSource implementation that always returns an abrupt completion indicating that a source phase import is not available.
|
||||
1. Throw a ReferenceError exception.
|
||||
1. Throw a SyntaxError exception.
|
||||
|
||||
---*/
|
||||
// The following case is equivalent of the call of:
|
||||
@ -58,7 +58,7 @@ const obj = {
|
||||
do {
|
||||
import.source(obj).catch(error => {
|
||||
|
||||
assert.sameValue(error.name, 'ReferenceError');
|
||||
assert.sameValue(error.name, 'SyntaxError');
|
||||
|
||||
}).then($DONE, $DONE);
|
||||
} while (false);
|
||||
|
@ -23,7 +23,7 @@ info: |
|
||||
|
||||
16.2.1.7.2 GetModuleSource ( )
|
||||
Source Text Module Record provides a GetModuleSource implementation that always returns an abrupt completion indicating that a source phase import is not available.
|
||||
1. Throw a ReferenceError exception.
|
||||
1. Throw a SyntaxError exception.
|
||||
|
||||
Import Calls
|
||||
|
||||
@ -51,7 +51,7 @@ if (false) {
|
||||
} else {
|
||||
import.source('./empty_FIXTURE.js').catch(error => {
|
||||
|
||||
assert.sameValue(error.name, 'ReferenceError');
|
||||
assert.sameValue(error.name, 'SyntaxError');
|
||||
|
||||
}).then($DONE, $DONE);
|
||||
}
|
||||
|
@ -42,7 +42,7 @@ info: |
|
||||
|
||||
16.2.1.7.2 GetModuleSource ( )
|
||||
Source Text Module Record provides a GetModuleSource implementation that always returns an abrupt completion indicating that a source phase import is not available.
|
||||
1. Throw a ReferenceError exception.
|
||||
1. Throw a SyntaxError exception.
|
||||
|
||||
---*/
|
||||
// The following case is equivalent of the call of:
|
||||
@ -60,7 +60,7 @@ if (false) {
|
||||
} else {
|
||||
import.source(obj).catch(error => {
|
||||
|
||||
assert.sameValue(error.name, 'ReferenceError');
|
||||
assert.sameValue(error.name, 'SyntaxError');
|
||||
|
||||
}).then($DONE, $DONE);
|
||||
}
|
||||
|
@ -23,7 +23,7 @@ info: |
|
||||
|
||||
16.2.1.7.2 GetModuleSource ( )
|
||||
Source Text Module Record provides a GetModuleSource implementation that always returns an abrupt completion indicating that a source phase import is not available.
|
||||
1. Throw a ReferenceError exception.
|
||||
1. Throw a SyntaxError exception.
|
||||
|
||||
Import Calls
|
||||
|
||||
@ -49,7 +49,7 @@ info: |
|
||||
function f() {
|
||||
import.source('./empty_FIXTURE.js').catch(error => {
|
||||
|
||||
assert.sameValue(error.name, 'ReferenceError');
|
||||
assert.sameValue(error.name, 'SyntaxError');
|
||||
|
||||
}).then($DONE, $DONE);
|
||||
}
|
||||
|
@ -42,7 +42,7 @@ info: |
|
||||
|
||||
16.2.1.7.2 GetModuleSource ( )
|
||||
Source Text Module Record provides a GetModuleSource implementation that always returns an abrupt completion indicating that a source phase import is not available.
|
||||
1. Throw a ReferenceError exception.
|
||||
1. Throw a SyntaxError exception.
|
||||
|
||||
---*/
|
||||
// The following case is equivalent of the call of:
|
||||
@ -58,7 +58,7 @@ const obj = {
|
||||
function f() {
|
||||
import.source(obj).catch(error => {
|
||||
|
||||
assert.sameValue(error.name, 'ReferenceError');
|
||||
assert.sameValue(error.name, 'SyntaxError');
|
||||
|
||||
}).then($DONE, $DONE);
|
||||
}
|
||||
|
@ -23,7 +23,7 @@ info: |
|
||||
|
||||
16.2.1.7.2 GetModuleSource ( )
|
||||
Source Text Module Record provides a GetModuleSource implementation that always returns an abrupt completion indicating that a source phase import is not available.
|
||||
1. Throw a ReferenceError exception.
|
||||
1. Throw a SyntaxError exception.
|
||||
|
||||
Import Calls
|
||||
|
||||
@ -49,7 +49,7 @@ info: |
|
||||
if (true) {
|
||||
import.source('./empty_FIXTURE.js').catch(error => {
|
||||
|
||||
assert.sameValue(error.name, 'ReferenceError');
|
||||
assert.sameValue(error.name, 'SyntaxError');
|
||||
|
||||
}).then($DONE, $DONE);
|
||||
}
|
||||
|
@ -42,7 +42,7 @@ info: |
|
||||
|
||||
16.2.1.7.2 GetModuleSource ( )
|
||||
Source Text Module Record provides a GetModuleSource implementation that always returns an abrupt completion indicating that a source phase import is not available.
|
||||
1. Throw a ReferenceError exception.
|
||||
1. Throw a SyntaxError exception.
|
||||
|
||||
---*/
|
||||
// The following case is equivalent of the call of:
|
||||
@ -58,7 +58,7 @@ const obj = {
|
||||
if (true) {
|
||||
import.source(obj).catch(error => {
|
||||
|
||||
assert.sameValue(error.name, 'ReferenceError');
|
||||
assert.sameValue(error.name, 'SyntaxError');
|
||||
|
||||
}).then($DONE, $DONE);
|
||||
}
|
||||
|
@ -23,7 +23,7 @@ info: |
|
||||
|
||||
16.2.1.7.2 GetModuleSource ( )
|
||||
Source Text Module Record provides a GetModuleSource implementation that always returns an abrupt completion indicating that a source phase import is not available.
|
||||
1. Throw a ReferenceError exception.
|
||||
1. Throw a SyntaxError exception.
|
||||
|
||||
Import Calls
|
||||
|
||||
@ -51,7 +51,7 @@ while (!x) {
|
||||
x++;
|
||||
import.source('./empty_FIXTURE.js').catch(error => {
|
||||
|
||||
assert.sameValue(error.name, 'ReferenceError');
|
||||
assert.sameValue(error.name, 'SyntaxError');
|
||||
|
||||
}).then($DONE, $DONE);
|
||||
};
|
||||
|
@ -42,7 +42,7 @@ info: |
|
||||
|
||||
16.2.1.7.2 GetModuleSource ( )
|
||||
Source Text Module Record provides a GetModuleSource implementation that always returns an abrupt completion indicating that a source phase import is not available.
|
||||
1. Throw a ReferenceError exception.
|
||||
1. Throw a SyntaxError exception.
|
||||
|
||||
---*/
|
||||
// The following case is equivalent of the call of:
|
||||
@ -60,7 +60,7 @@ while (!x) {
|
||||
x++;
|
||||
import.source(obj).catch(error => {
|
||||
|
||||
assert.sameValue(error.name, 'ReferenceError');
|
||||
assert.sameValue(error.name, 'SyntaxError');
|
||||
|
||||
}).then($DONE, $DONE);
|
||||
};
|
||||
|
@ -23,7 +23,7 @@ info: |
|
||||
|
||||
16.2.1.7.2 GetModuleSource ( )
|
||||
Source Text Module Record provides a GetModuleSource implementation that always returns an abrupt completion indicating that a source phase import is not available.
|
||||
1. Throw a ReferenceError exception.
|
||||
1. Throw a SyntaxError exception.
|
||||
|
||||
Import Calls
|
||||
|
||||
@ -48,6 +48,6 @@ info: |
|
||||
|
||||
import.source('./empty_FIXTURE.js').catch(error => {
|
||||
|
||||
assert.sameValue(error.name, 'ReferenceError');
|
||||
assert.sameValue(error.name, 'SyntaxError');
|
||||
|
||||
}).then($DONE, $DONE);
|
||||
|
@ -42,7 +42,7 @@ info: |
|
||||
|
||||
16.2.1.7.2 GetModuleSource ( )
|
||||
Source Text Module Record provides a GetModuleSource implementation that always returns an abrupt completion indicating that a source phase import is not available.
|
||||
1. Throw a ReferenceError exception.
|
||||
1. Throw a SyntaxError exception.
|
||||
|
||||
---*/
|
||||
// The following case is equivalent of the call of:
|
||||
@ -57,6 +57,6 @@ const obj = {
|
||||
|
||||
import.source(obj).catch(error => {
|
||||
|
||||
assert.sameValue(error.name, 'ReferenceError');
|
||||
assert.sameValue(error.name, 'SyntaxError');
|
||||
|
||||
}).then($DONE, $DONE);
|
||||
|
@ -3,7 +3,7 @@
|
||||
// found in the LICENSE file.
|
||||
/*---
|
||||
description: >
|
||||
GetModuleSource of SourceTextModule throws a ReferenceError.
|
||||
GetModuleSource of SourceTextModule throws a SyntaxError.
|
||||
esid: sec-source-text-module-record-getmodulesource
|
||||
features: [source-phase-imports]
|
||||
flags: [async]
|
||||
@ -12,13 +12,13 @@ includes: [asyncHelpers.js]
|
||||
|
||||
asyncTest(async function () {
|
||||
await assert.throwsAsync(
|
||||
ReferenceError,
|
||||
SyntaxError,
|
||||
() => import.source('./modules-simple_FIXTURE.js'),
|
||||
"Promise should be rejected with ReferenceError");
|
||||
"Promise should be rejected with SyntaxError");
|
||||
|
||||
// Import a module that has a source phase import.
|
||||
await assert.throwsAsync(
|
||||
ReferenceError,
|
||||
SyntaxError,
|
||||
() => import('./modules-import-source_FIXTURE.js'),
|
||||
"Promise should be rejected with ReferenceError in indirect import source");
|
||||
"Promise should be rejected with SyntaxError in indirect import source");
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user