mirror of
https://github.com/tc39/test262.git
synced 2025-07-26 23:44:27 +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: |
|
info: |
|
||||||
16.2.1.7.2 GetModuleSource ( )
|
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.
|
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
|
Import Calls
|
||||||
|
|
||||||
@ -35,4 +35,4 @@ features: [source-phase-imports]
|
|||||||
//- import
|
//- import
|
||||||
import.source('./empty_FIXTURE.js')
|
import.source('./empty_FIXTURE.js')
|
||||||
//- body
|
//- body
|
||||||
assert.sameValue(error.name, 'ReferenceError');
|
assert.sameValue(error.name, 'SyntaxError');
|
||||||
|
@ -28,7 +28,7 @@ info: |
|
|||||||
|
|
||||||
16.2.1.7.2 GetModuleSource ( )
|
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.
|
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
|
template: catch
|
||||||
features: [source-phase-imports]
|
features: [source-phase-imports]
|
||||||
@ -47,4 +47,4 @@ const obj = {
|
|||||||
//- import
|
//- import
|
||||||
import.source(obj)
|
import.source(obj)
|
||||||
//- body
|
//- body
|
||||||
assert.sameValue(error.name, 'ReferenceError');
|
assert.sameValue(error.name, 'SyntaxError');
|
||||||
|
@ -23,7 +23,7 @@ info: |
|
|||||||
|
|
||||||
16.2.1.7.2 GetModuleSource ( )
|
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.
|
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
|
Import Calls
|
||||||
|
|
||||||
@ -49,7 +49,7 @@ info: |
|
|||||||
let f = () => {
|
let f = () => {
|
||||||
import.source('./empty_FIXTURE.js').catch(error => {
|
import.source('./empty_FIXTURE.js').catch(error => {
|
||||||
|
|
||||||
assert.sameValue(error.name, 'ReferenceError');
|
assert.sameValue(error.name, 'SyntaxError');
|
||||||
|
|
||||||
}).then($DONE, $DONE);
|
}).then($DONE, $DONE);
|
||||||
};
|
};
|
||||||
|
@ -42,7 +42,7 @@ info: |
|
|||||||
|
|
||||||
16.2.1.7.2 GetModuleSource ( )
|
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.
|
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:
|
// The following case is equivalent of the call of:
|
||||||
@ -58,7 +58,7 @@ const obj = {
|
|||||||
let f = () => {
|
let f = () => {
|
||||||
import.source(obj).catch(error => {
|
import.source(obj).catch(error => {
|
||||||
|
|
||||||
assert.sameValue(error.name, 'ReferenceError');
|
assert.sameValue(error.name, 'SyntaxError');
|
||||||
|
|
||||||
}).then($DONE, $DONE);
|
}).then($DONE, $DONE);
|
||||||
};
|
};
|
||||||
|
@ -23,7 +23,7 @@ info: |
|
|||||||
|
|
||||||
16.2.1.7.2 GetModuleSource ( )
|
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.
|
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
|
Import Calls
|
||||||
|
|
||||||
@ -52,6 +52,6 @@ const f = async () => {
|
|||||||
|
|
||||||
f().catch(error => {
|
f().catch(error => {
|
||||||
|
|
||||||
assert.sameValue(error.name, 'ReferenceError');
|
assert.sameValue(error.name, 'SyntaxError');
|
||||||
|
|
||||||
}).then($DONE, $DONE);
|
}).then($DONE, $DONE);
|
||||||
|
@ -42,7 +42,7 @@ info: |
|
|||||||
|
|
||||||
16.2.1.7.2 GetModuleSource ( )
|
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.
|
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:
|
// The following case is equivalent of the call of:
|
||||||
@ -61,6 +61,6 @@ const f = async () => {
|
|||||||
|
|
||||||
f().catch(error => {
|
f().catch(error => {
|
||||||
|
|
||||||
assert.sameValue(error.name, 'ReferenceError');
|
assert.sameValue(error.name, 'SyntaxError');
|
||||||
|
|
||||||
}).then($DONE, $DONE);
|
}).then($DONE, $DONE);
|
||||||
|
@ -23,7 +23,7 @@ info: |
|
|||||||
|
|
||||||
16.2.1.7.2 GetModuleSource ( )
|
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.
|
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
|
Import Calls
|
||||||
|
|
||||||
@ -50,6 +50,6 @@ const f = async () => await import.source('./empty_FIXTURE.js');
|
|||||||
|
|
||||||
f().catch(error => {
|
f().catch(error => {
|
||||||
|
|
||||||
assert.sameValue(error.name, 'ReferenceError');
|
assert.sameValue(error.name, 'SyntaxError');
|
||||||
|
|
||||||
}).then($DONE, $DONE);
|
}).then($DONE, $DONE);
|
||||||
|
@ -42,7 +42,7 @@ info: |
|
|||||||
|
|
||||||
16.2.1.7.2 GetModuleSource ( )
|
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.
|
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:
|
// The following case is equivalent of the call of:
|
||||||
@ -59,6 +59,6 @@ const f = async () => await import.source(obj);
|
|||||||
|
|
||||||
f().catch(error => {
|
f().catch(error => {
|
||||||
|
|
||||||
assert.sameValue(error.name, 'ReferenceError');
|
assert.sameValue(error.name, 'SyntaxError');
|
||||||
|
|
||||||
}).then($DONE, $DONE);
|
}).then($DONE, $DONE);
|
||||||
|
@ -23,7 +23,7 @@ info: |
|
|||||||
|
|
||||||
16.2.1.7.2 GetModuleSource ( )
|
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.
|
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
|
Import Calls
|
||||||
|
|
||||||
@ -49,7 +49,7 @@ info: |
|
|||||||
async function f() {
|
async function f() {
|
||||||
await import.source('./empty_FIXTURE.js').catch(error => {
|
await import.source('./empty_FIXTURE.js').catch(error => {
|
||||||
|
|
||||||
assert.sameValue(error.name, 'ReferenceError');
|
assert.sameValue(error.name, 'SyntaxError');
|
||||||
|
|
||||||
}).then($DONE, $DONE);
|
}).then($DONE, $DONE);
|
||||||
}
|
}
|
||||||
|
@ -42,7 +42,7 @@ info: |
|
|||||||
|
|
||||||
16.2.1.7.2 GetModuleSource ( )
|
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.
|
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:
|
// The following case is equivalent of the call of:
|
||||||
@ -58,7 +58,7 @@ const obj = {
|
|||||||
async function f() {
|
async function f() {
|
||||||
await import.source(obj).catch(error => {
|
await import.source(obj).catch(error => {
|
||||||
|
|
||||||
assert.sameValue(error.name, 'ReferenceError');
|
assert.sameValue(error.name, 'SyntaxError');
|
||||||
|
|
||||||
}).then($DONE, $DONE);
|
}).then($DONE, $DONE);
|
||||||
}
|
}
|
||||||
|
@ -23,7 +23,7 @@ info: |
|
|||||||
|
|
||||||
16.2.1.7.2 GetModuleSource ( )
|
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.
|
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
|
Import Calls
|
||||||
|
|
||||||
@ -49,7 +49,7 @@ info: |
|
|||||||
async function f() {
|
async function f() {
|
||||||
import.source('./empty_FIXTURE.js').catch(error => {
|
import.source('./empty_FIXTURE.js').catch(error => {
|
||||||
|
|
||||||
assert.sameValue(error.name, 'ReferenceError');
|
assert.sameValue(error.name, 'SyntaxError');
|
||||||
|
|
||||||
}).then($DONE, $DONE);
|
}).then($DONE, $DONE);
|
||||||
}
|
}
|
||||||
|
@ -42,7 +42,7 @@ info: |
|
|||||||
|
|
||||||
16.2.1.7.2 GetModuleSource ( )
|
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.
|
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:
|
// The following case is equivalent of the call of:
|
||||||
@ -58,7 +58,7 @@ const obj = {
|
|||||||
async function f() {
|
async function f() {
|
||||||
import.source(obj).catch(error => {
|
import.source(obj).catch(error => {
|
||||||
|
|
||||||
assert.sameValue(error.name, 'ReferenceError');
|
assert.sameValue(error.name, 'SyntaxError');
|
||||||
|
|
||||||
}).then($DONE, $DONE);
|
}).then($DONE, $DONE);
|
||||||
}
|
}
|
||||||
|
@ -23,7 +23,7 @@ info: |
|
|||||||
|
|
||||||
16.2.1.7.2 GetModuleSource ( )
|
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.
|
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
|
Import Calls
|
||||||
|
|
||||||
@ -49,7 +49,7 @@ info: |
|
|||||||
async function f() {
|
async function f() {
|
||||||
return await import.source('./empty_FIXTURE.js').catch(error => {
|
return await import.source('./empty_FIXTURE.js').catch(error => {
|
||||||
|
|
||||||
assert.sameValue(error.name, 'ReferenceError');
|
assert.sameValue(error.name, 'SyntaxError');
|
||||||
|
|
||||||
}).then($DONE, $DONE);
|
}).then($DONE, $DONE);
|
||||||
}
|
}
|
||||||
|
@ -42,7 +42,7 @@ info: |
|
|||||||
|
|
||||||
16.2.1.7.2 GetModuleSource ( )
|
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.
|
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:
|
// The following case is equivalent of the call of:
|
||||||
@ -58,7 +58,7 @@ const obj = {
|
|||||||
async function f() {
|
async function f() {
|
||||||
return await import.source(obj).catch(error => {
|
return await import.source(obj).catch(error => {
|
||||||
|
|
||||||
assert.sameValue(error.name, 'ReferenceError');
|
assert.sameValue(error.name, 'SyntaxError');
|
||||||
|
|
||||||
}).then($DONE, $DONE);
|
}).then($DONE, $DONE);
|
||||||
}
|
}
|
||||||
|
@ -23,7 +23,7 @@ info: |
|
|||||||
|
|
||||||
16.2.1.7.2 GetModuleSource ( )
|
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.
|
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
|
Import Calls
|
||||||
|
|
||||||
@ -52,6 +52,6 @@ async function * f() {
|
|||||||
|
|
||||||
f().next().catch(error => {
|
f().next().catch(error => {
|
||||||
|
|
||||||
assert.sameValue(error.name, 'ReferenceError');
|
assert.sameValue(error.name, 'SyntaxError');
|
||||||
|
|
||||||
}).then($DONE, $DONE);
|
}).then($DONE, $DONE);
|
||||||
|
@ -42,7 +42,7 @@ info: |
|
|||||||
|
|
||||||
16.2.1.7.2 GetModuleSource ( )
|
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.
|
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:
|
// The following case is equivalent of the call of:
|
||||||
@ -61,6 +61,6 @@ async function * f() {
|
|||||||
|
|
||||||
f().next().catch(error => {
|
f().next().catch(error => {
|
||||||
|
|
||||||
assert.sameValue(error.name, 'ReferenceError');
|
assert.sameValue(error.name, 'SyntaxError');
|
||||||
|
|
||||||
}).then($DONE, $DONE);
|
}).then($DONE, $DONE);
|
||||||
|
@ -23,7 +23,7 @@ info: |
|
|||||||
|
|
||||||
16.2.1.7.2 GetModuleSource ( )
|
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.
|
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
|
Import Calls
|
||||||
|
|
||||||
@ -52,6 +52,6 @@ async function * f() {
|
|||||||
|
|
||||||
f().next().catch(error => {
|
f().next().catch(error => {
|
||||||
|
|
||||||
assert.sameValue(error.name, 'ReferenceError');
|
assert.sameValue(error.name, 'SyntaxError');
|
||||||
|
|
||||||
}).then($DONE, $DONE);
|
}).then($DONE, $DONE);
|
||||||
|
@ -42,7 +42,7 @@ info: |
|
|||||||
|
|
||||||
16.2.1.7.2 GetModuleSource ( )
|
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.
|
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:
|
// The following case is equivalent of the call of:
|
||||||
@ -61,6 +61,6 @@ async function * f() {
|
|||||||
|
|
||||||
f().next().catch(error => {
|
f().next().catch(error => {
|
||||||
|
|
||||||
assert.sameValue(error.name, 'ReferenceError');
|
assert.sameValue(error.name, 'SyntaxError');
|
||||||
|
|
||||||
}).then($DONE, $DONE);
|
}).then($DONE, $DONE);
|
||||||
|
@ -23,7 +23,7 @@ info: |
|
|||||||
|
|
||||||
16.2.1.7.2 GetModuleSource ( )
|
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.
|
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
|
Import Calls
|
||||||
|
|
||||||
@ -49,7 +49,7 @@ info: |
|
|||||||
{
|
{
|
||||||
import.source('./empty_FIXTURE.js').catch(error => {
|
import.source('./empty_FIXTURE.js').catch(error => {
|
||||||
|
|
||||||
assert.sameValue(error.name, 'ReferenceError');
|
assert.sameValue(error.name, 'SyntaxError');
|
||||||
|
|
||||||
}).then($DONE, $DONE);
|
}).then($DONE, $DONE);
|
||||||
};
|
};
|
||||||
|
@ -42,7 +42,7 @@ info: |
|
|||||||
|
|
||||||
16.2.1.7.2 GetModuleSource ( )
|
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.
|
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:
|
// The following case is equivalent of the call of:
|
||||||
@ -58,7 +58,7 @@ const obj = {
|
|||||||
{
|
{
|
||||||
import.source(obj).catch(error => {
|
import.source(obj).catch(error => {
|
||||||
|
|
||||||
assert.sameValue(error.name, 'ReferenceError');
|
assert.sameValue(error.name, 'SyntaxError');
|
||||||
|
|
||||||
}).then($DONE, $DONE);
|
}).then($DONE, $DONE);
|
||||||
};
|
};
|
||||||
|
@ -23,7 +23,7 @@ info: |
|
|||||||
|
|
||||||
16.2.1.7.2 GetModuleSource ( )
|
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.
|
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
|
Import Calls
|
||||||
|
|
||||||
@ -49,7 +49,7 @@ info: |
|
|||||||
label: {
|
label: {
|
||||||
import.source('./empty_FIXTURE.js').catch(error => {
|
import.source('./empty_FIXTURE.js').catch(error => {
|
||||||
|
|
||||||
assert.sameValue(error.name, 'ReferenceError');
|
assert.sameValue(error.name, 'SyntaxError');
|
||||||
|
|
||||||
}).then($DONE, $DONE);
|
}).then($DONE, $DONE);
|
||||||
};
|
};
|
||||||
|
@ -42,7 +42,7 @@ info: |
|
|||||||
|
|
||||||
16.2.1.7.2 GetModuleSource ( )
|
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.
|
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:
|
// The following case is equivalent of the call of:
|
||||||
@ -58,7 +58,7 @@ const obj = {
|
|||||||
label: {
|
label: {
|
||||||
import.source(obj).catch(error => {
|
import.source(obj).catch(error => {
|
||||||
|
|
||||||
assert.sameValue(error.name, 'ReferenceError');
|
assert.sameValue(error.name, 'SyntaxError');
|
||||||
|
|
||||||
}).then($DONE, $DONE);
|
}).then($DONE, $DONE);
|
||||||
};
|
};
|
||||||
|
@ -23,7 +23,7 @@ info: |
|
|||||||
|
|
||||||
16.2.1.7.2 GetModuleSource ( )
|
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.
|
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
|
Import Calls
|
||||||
|
|
||||||
@ -49,7 +49,7 @@ info: |
|
|||||||
do {
|
do {
|
||||||
import.source('./empty_FIXTURE.js').catch(error => {
|
import.source('./empty_FIXTURE.js').catch(error => {
|
||||||
|
|
||||||
assert.sameValue(error.name, 'ReferenceError');
|
assert.sameValue(error.name, 'SyntaxError');
|
||||||
|
|
||||||
}).then($DONE, $DONE);
|
}).then($DONE, $DONE);
|
||||||
} while (false);
|
} while (false);
|
||||||
|
@ -42,7 +42,7 @@ info: |
|
|||||||
|
|
||||||
16.2.1.7.2 GetModuleSource ( )
|
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.
|
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:
|
// The following case is equivalent of the call of:
|
||||||
@ -58,7 +58,7 @@ const obj = {
|
|||||||
do {
|
do {
|
||||||
import.source(obj).catch(error => {
|
import.source(obj).catch(error => {
|
||||||
|
|
||||||
assert.sameValue(error.name, 'ReferenceError');
|
assert.sameValue(error.name, 'SyntaxError');
|
||||||
|
|
||||||
}).then($DONE, $DONE);
|
}).then($DONE, $DONE);
|
||||||
} while (false);
|
} while (false);
|
||||||
|
@ -23,7 +23,7 @@ info: |
|
|||||||
|
|
||||||
16.2.1.7.2 GetModuleSource ( )
|
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.
|
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
|
Import Calls
|
||||||
|
|
||||||
@ -51,7 +51,7 @@ if (false) {
|
|||||||
} else {
|
} else {
|
||||||
import.source('./empty_FIXTURE.js').catch(error => {
|
import.source('./empty_FIXTURE.js').catch(error => {
|
||||||
|
|
||||||
assert.sameValue(error.name, 'ReferenceError');
|
assert.sameValue(error.name, 'SyntaxError');
|
||||||
|
|
||||||
}).then($DONE, $DONE);
|
}).then($DONE, $DONE);
|
||||||
}
|
}
|
||||||
|
@ -42,7 +42,7 @@ info: |
|
|||||||
|
|
||||||
16.2.1.7.2 GetModuleSource ( )
|
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.
|
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:
|
// The following case is equivalent of the call of:
|
||||||
@ -60,7 +60,7 @@ if (false) {
|
|||||||
} else {
|
} else {
|
||||||
import.source(obj).catch(error => {
|
import.source(obj).catch(error => {
|
||||||
|
|
||||||
assert.sameValue(error.name, 'ReferenceError');
|
assert.sameValue(error.name, 'SyntaxError');
|
||||||
|
|
||||||
}).then($DONE, $DONE);
|
}).then($DONE, $DONE);
|
||||||
}
|
}
|
||||||
|
@ -23,7 +23,7 @@ info: |
|
|||||||
|
|
||||||
16.2.1.7.2 GetModuleSource ( )
|
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.
|
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
|
Import Calls
|
||||||
|
|
||||||
@ -49,7 +49,7 @@ info: |
|
|||||||
function f() {
|
function f() {
|
||||||
import.source('./empty_FIXTURE.js').catch(error => {
|
import.source('./empty_FIXTURE.js').catch(error => {
|
||||||
|
|
||||||
assert.sameValue(error.name, 'ReferenceError');
|
assert.sameValue(error.name, 'SyntaxError');
|
||||||
|
|
||||||
}).then($DONE, $DONE);
|
}).then($DONE, $DONE);
|
||||||
}
|
}
|
||||||
|
@ -42,7 +42,7 @@ info: |
|
|||||||
|
|
||||||
16.2.1.7.2 GetModuleSource ( )
|
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.
|
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:
|
// The following case is equivalent of the call of:
|
||||||
@ -58,7 +58,7 @@ const obj = {
|
|||||||
function f() {
|
function f() {
|
||||||
import.source(obj).catch(error => {
|
import.source(obj).catch(error => {
|
||||||
|
|
||||||
assert.sameValue(error.name, 'ReferenceError');
|
assert.sameValue(error.name, 'SyntaxError');
|
||||||
|
|
||||||
}).then($DONE, $DONE);
|
}).then($DONE, $DONE);
|
||||||
}
|
}
|
||||||
|
@ -23,7 +23,7 @@ info: |
|
|||||||
|
|
||||||
16.2.1.7.2 GetModuleSource ( )
|
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.
|
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
|
Import Calls
|
||||||
|
|
||||||
@ -49,7 +49,7 @@ info: |
|
|||||||
if (true) {
|
if (true) {
|
||||||
import.source('./empty_FIXTURE.js').catch(error => {
|
import.source('./empty_FIXTURE.js').catch(error => {
|
||||||
|
|
||||||
assert.sameValue(error.name, 'ReferenceError');
|
assert.sameValue(error.name, 'SyntaxError');
|
||||||
|
|
||||||
}).then($DONE, $DONE);
|
}).then($DONE, $DONE);
|
||||||
}
|
}
|
||||||
|
@ -42,7 +42,7 @@ info: |
|
|||||||
|
|
||||||
16.2.1.7.2 GetModuleSource ( )
|
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.
|
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:
|
// The following case is equivalent of the call of:
|
||||||
@ -58,7 +58,7 @@ const obj = {
|
|||||||
if (true) {
|
if (true) {
|
||||||
import.source(obj).catch(error => {
|
import.source(obj).catch(error => {
|
||||||
|
|
||||||
assert.sameValue(error.name, 'ReferenceError');
|
assert.sameValue(error.name, 'SyntaxError');
|
||||||
|
|
||||||
}).then($DONE, $DONE);
|
}).then($DONE, $DONE);
|
||||||
}
|
}
|
||||||
|
@ -23,7 +23,7 @@ info: |
|
|||||||
|
|
||||||
16.2.1.7.2 GetModuleSource ( )
|
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.
|
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
|
Import Calls
|
||||||
|
|
||||||
@ -51,7 +51,7 @@ while (!x) {
|
|||||||
x++;
|
x++;
|
||||||
import.source('./empty_FIXTURE.js').catch(error => {
|
import.source('./empty_FIXTURE.js').catch(error => {
|
||||||
|
|
||||||
assert.sameValue(error.name, 'ReferenceError');
|
assert.sameValue(error.name, 'SyntaxError');
|
||||||
|
|
||||||
}).then($DONE, $DONE);
|
}).then($DONE, $DONE);
|
||||||
};
|
};
|
||||||
|
@ -42,7 +42,7 @@ info: |
|
|||||||
|
|
||||||
16.2.1.7.2 GetModuleSource ( )
|
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.
|
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:
|
// The following case is equivalent of the call of:
|
||||||
@ -60,7 +60,7 @@ while (!x) {
|
|||||||
x++;
|
x++;
|
||||||
import.source(obj).catch(error => {
|
import.source(obj).catch(error => {
|
||||||
|
|
||||||
assert.sameValue(error.name, 'ReferenceError');
|
assert.sameValue(error.name, 'SyntaxError');
|
||||||
|
|
||||||
}).then($DONE, $DONE);
|
}).then($DONE, $DONE);
|
||||||
};
|
};
|
||||||
|
@ -23,7 +23,7 @@ info: |
|
|||||||
|
|
||||||
16.2.1.7.2 GetModuleSource ( )
|
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.
|
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
|
Import Calls
|
||||||
|
|
||||||
@ -48,6 +48,6 @@ info: |
|
|||||||
|
|
||||||
import.source('./empty_FIXTURE.js').catch(error => {
|
import.source('./empty_FIXTURE.js').catch(error => {
|
||||||
|
|
||||||
assert.sameValue(error.name, 'ReferenceError');
|
assert.sameValue(error.name, 'SyntaxError');
|
||||||
|
|
||||||
}).then($DONE, $DONE);
|
}).then($DONE, $DONE);
|
||||||
|
@ -42,7 +42,7 @@ info: |
|
|||||||
|
|
||||||
16.2.1.7.2 GetModuleSource ( )
|
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.
|
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:
|
// The following case is equivalent of the call of:
|
||||||
@ -57,6 +57,6 @@ const obj = {
|
|||||||
|
|
||||||
import.source(obj).catch(error => {
|
import.source(obj).catch(error => {
|
||||||
|
|
||||||
assert.sameValue(error.name, 'ReferenceError');
|
assert.sameValue(error.name, 'SyntaxError');
|
||||||
|
|
||||||
}).then($DONE, $DONE);
|
}).then($DONE, $DONE);
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
// found in the LICENSE file.
|
// found in the LICENSE file.
|
||||||
/*---
|
/*---
|
||||||
description: >
|
description: >
|
||||||
GetModuleSource of SourceTextModule throws a ReferenceError.
|
GetModuleSource of SourceTextModule throws a SyntaxError.
|
||||||
esid: sec-source-text-module-record-getmodulesource
|
esid: sec-source-text-module-record-getmodulesource
|
||||||
features: [source-phase-imports]
|
features: [source-phase-imports]
|
||||||
flags: [async]
|
flags: [async]
|
||||||
@ -12,13 +12,13 @@ includes: [asyncHelpers.js]
|
|||||||
|
|
||||||
asyncTest(async function () {
|
asyncTest(async function () {
|
||||||
await assert.throwsAsync(
|
await assert.throwsAsync(
|
||||||
ReferenceError,
|
SyntaxError,
|
||||||
() => import.source('./modules-simple_FIXTURE.js'),
|
() => 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.
|
// Import a module that has a source phase import.
|
||||||
await assert.throwsAsync(
|
await assert.throwsAsync(
|
||||||
ReferenceError,
|
SyntaxError,
|
||||||
() => import('./modules-import-source_FIXTURE.js'),
|
() => 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