From 3f0a24f4f6a9c84c4f4edc9a19d6c8d74521aaa7 Mon Sep 17 00:00:00 2001 From: Chengzhong Wu Date: Thu, 17 Oct 2024 16:47:59 +0100 Subject: [PATCH] [source-phase-imports] update missing source error type --- .../import-source-source-text-module.case | 4 ++-- .../import-source-specifier-tostring.case | 4 ++-- ...ow-import-catch-import-source-source-text-module.js | 4 ++-- ...ow-import-catch-import-source-specifier-tostring.js | 4 ++-- ...-function-await-import-source-source-text-module.js | 4 ++-- ...-function-await-import-source-specifier-tostring.js | 4 ++-- ...on-return-await-import-source-source-text-module.js | 4 ++-- ...on-return-await-import-source-specifier-tostring.js | 4 ++-- ...-function-await-import-source-source-text-module.js | 4 ++-- ...-function-await-import-source-specifier-tostring.js | 4 ++-- ...-async-function-import-source-source-text-module.js | 4 ++-- ...-async-function-import-source-specifier-tostring.js | 4 ++-- ...on-return-await-import-source-source-text-module.js | 4 ++-- ...on-return-await-import-source-specifier-tostring.js | 4 ++-- ...async-gen-await-import-source-source-text-module.js | 4 ++-- ...async-gen-await-import-source-specifier-tostring.js | 4 ++-- ...en-return-await-import-source-source-text-module.js | 4 ++-- ...en-return-await-import-source-specifier-tostring.js | 4 ++-- ...ck-import-catch-import-source-source-text-module.js | 4 ++-- ...ck-import-catch-import-source-specifier-tostring.js | 4 ++-- ...d-block-labeled-import-source-source-text-module.js | 4 ++-- ...d-block-labeled-import-source-specifier-tostring.js | 4 ++-- ...nested-do-while-import-source-source-text-module.js | 4 ++-- ...nested-do-while-import-source-specifier-tostring.js | 4 ++-- ...se-import-catch-import-source-source-text-module.js | 4 ++-- ...se-import-catch-import-source-specifier-tostring.js | 4 ++-- ...on-import-catch-import-source-source-text-module.js | 4 ++-- ...on-import-catch-import-source-specifier-tostring.js | 4 ++-- ...if-import-catch-import-source-source-text-module.js | 4 ++-- ...if-import-catch-import-source-specifier-tostring.js | 4 ++-- ...le-import-catch-import-source-source-text-module.js | 4 ++-- ...le-import-catch-import-source-specifier-tostring.js | 4 ++-- ...el-import-catch-import-source-source-text-module.js | 4 ++-- ...el-import-catch-import-source-specifier-tostring.js | 4 ++-- .../import-source-source-text-module.js | 10 +++++----- 35 files changed, 73 insertions(+), 73 deletions(-) diff --git a/src/dynamic-import/import-source-source-text-module.case b/src/dynamic-import/import-source-source-text-module.case index c095051c81..aa0bc5dbcd 100644 --- a/src/dynamic-import/import-source-source-text-module.case +++ b/src/dynamic-import/import-source-source-text-module.case @@ -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'); diff --git a/src/dynamic-import/import-source-specifier-tostring.case b/src/dynamic-import/import-source-specifier-tostring.case index ee9f23510b..3c267c38c5 100644 --- a/src/dynamic-import/import-source-specifier-tostring.case +++ b/src/dynamic-import/import-source-specifier-tostring.case @@ -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'); diff --git a/test/language/expressions/dynamic-import/catch/nested-arrow-import-catch-import-source-source-text-module.js b/test/language/expressions/dynamic-import/catch/nested-arrow-import-catch-import-source-source-text-module.js index a1bc35872d..8cae33cf19 100644 --- a/test/language/expressions/dynamic-import/catch/nested-arrow-import-catch-import-source-source-text-module.js +++ b/test/language/expressions/dynamic-import/catch/nested-arrow-import-catch-import-source-source-text-module.js @@ -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); }; diff --git a/test/language/expressions/dynamic-import/catch/nested-arrow-import-catch-import-source-specifier-tostring.js b/test/language/expressions/dynamic-import/catch/nested-arrow-import-catch-import-source-specifier-tostring.js index d7f2d7a92e..cdaed9e77f 100644 --- a/test/language/expressions/dynamic-import/catch/nested-arrow-import-catch-import-source-specifier-tostring.js +++ b/test/language/expressions/dynamic-import/catch/nested-arrow-import-catch-import-source-specifier-tostring.js @@ -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); }; diff --git a/test/language/expressions/dynamic-import/catch/nested-async-arrow-function-await-import-source-source-text-module.js b/test/language/expressions/dynamic-import/catch/nested-async-arrow-function-await-import-source-source-text-module.js index 888349b405..3281816155 100644 --- a/test/language/expressions/dynamic-import/catch/nested-async-arrow-function-await-import-source-source-text-module.js +++ b/test/language/expressions/dynamic-import/catch/nested-async-arrow-function-await-import-source-source-text-module.js @@ -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); diff --git a/test/language/expressions/dynamic-import/catch/nested-async-arrow-function-await-import-source-specifier-tostring.js b/test/language/expressions/dynamic-import/catch/nested-async-arrow-function-await-import-source-specifier-tostring.js index be3fa4c1ed..856a1c9424 100644 --- a/test/language/expressions/dynamic-import/catch/nested-async-arrow-function-await-import-source-specifier-tostring.js +++ b/test/language/expressions/dynamic-import/catch/nested-async-arrow-function-await-import-source-specifier-tostring.js @@ -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); diff --git a/test/language/expressions/dynamic-import/catch/nested-async-arrow-function-return-await-import-source-source-text-module.js b/test/language/expressions/dynamic-import/catch/nested-async-arrow-function-return-await-import-source-source-text-module.js index 0ab1239e5c..3f22645a5e 100644 --- a/test/language/expressions/dynamic-import/catch/nested-async-arrow-function-return-await-import-source-source-text-module.js +++ b/test/language/expressions/dynamic-import/catch/nested-async-arrow-function-return-await-import-source-source-text-module.js @@ -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); diff --git a/test/language/expressions/dynamic-import/catch/nested-async-arrow-function-return-await-import-source-specifier-tostring.js b/test/language/expressions/dynamic-import/catch/nested-async-arrow-function-return-await-import-source-specifier-tostring.js index 318ce70137..e4752afea0 100644 --- a/test/language/expressions/dynamic-import/catch/nested-async-arrow-function-return-await-import-source-specifier-tostring.js +++ b/test/language/expressions/dynamic-import/catch/nested-async-arrow-function-return-await-import-source-specifier-tostring.js @@ -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); diff --git a/test/language/expressions/dynamic-import/catch/nested-async-function-await-import-source-source-text-module.js b/test/language/expressions/dynamic-import/catch/nested-async-function-await-import-source-source-text-module.js index 2763bbae7d..6fab847048 100644 --- a/test/language/expressions/dynamic-import/catch/nested-async-function-await-import-source-source-text-module.js +++ b/test/language/expressions/dynamic-import/catch/nested-async-function-await-import-source-source-text-module.js @@ -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); } diff --git a/test/language/expressions/dynamic-import/catch/nested-async-function-await-import-source-specifier-tostring.js b/test/language/expressions/dynamic-import/catch/nested-async-function-await-import-source-specifier-tostring.js index fb14fb661e..f06701a669 100644 --- a/test/language/expressions/dynamic-import/catch/nested-async-function-await-import-source-specifier-tostring.js +++ b/test/language/expressions/dynamic-import/catch/nested-async-function-await-import-source-specifier-tostring.js @@ -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); } diff --git a/test/language/expressions/dynamic-import/catch/nested-async-function-import-source-source-text-module.js b/test/language/expressions/dynamic-import/catch/nested-async-function-import-source-source-text-module.js index 78460b3594..33f2b6ada7 100644 --- a/test/language/expressions/dynamic-import/catch/nested-async-function-import-source-source-text-module.js +++ b/test/language/expressions/dynamic-import/catch/nested-async-function-import-source-source-text-module.js @@ -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); } diff --git a/test/language/expressions/dynamic-import/catch/nested-async-function-import-source-specifier-tostring.js b/test/language/expressions/dynamic-import/catch/nested-async-function-import-source-specifier-tostring.js index a0e9838711..0c2705e826 100644 --- a/test/language/expressions/dynamic-import/catch/nested-async-function-import-source-specifier-tostring.js +++ b/test/language/expressions/dynamic-import/catch/nested-async-function-import-source-specifier-tostring.js @@ -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); } diff --git a/test/language/expressions/dynamic-import/catch/nested-async-function-return-await-import-source-source-text-module.js b/test/language/expressions/dynamic-import/catch/nested-async-function-return-await-import-source-source-text-module.js index bee973034d..a87207ffe9 100644 --- a/test/language/expressions/dynamic-import/catch/nested-async-function-return-await-import-source-source-text-module.js +++ b/test/language/expressions/dynamic-import/catch/nested-async-function-return-await-import-source-source-text-module.js @@ -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); } diff --git a/test/language/expressions/dynamic-import/catch/nested-async-function-return-await-import-source-specifier-tostring.js b/test/language/expressions/dynamic-import/catch/nested-async-function-return-await-import-source-specifier-tostring.js index 96256180f7..5280e17019 100644 --- a/test/language/expressions/dynamic-import/catch/nested-async-function-return-await-import-source-specifier-tostring.js +++ b/test/language/expressions/dynamic-import/catch/nested-async-function-return-await-import-source-specifier-tostring.js @@ -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); } diff --git a/test/language/expressions/dynamic-import/catch/nested-async-gen-await-import-source-source-text-module.js b/test/language/expressions/dynamic-import/catch/nested-async-gen-await-import-source-source-text-module.js index 043fddfa36..d6dedb8884 100644 --- a/test/language/expressions/dynamic-import/catch/nested-async-gen-await-import-source-source-text-module.js +++ b/test/language/expressions/dynamic-import/catch/nested-async-gen-await-import-source-source-text-module.js @@ -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); diff --git a/test/language/expressions/dynamic-import/catch/nested-async-gen-await-import-source-specifier-tostring.js b/test/language/expressions/dynamic-import/catch/nested-async-gen-await-import-source-specifier-tostring.js index 3ce755aef0..2c6036c0aa 100644 --- a/test/language/expressions/dynamic-import/catch/nested-async-gen-await-import-source-specifier-tostring.js +++ b/test/language/expressions/dynamic-import/catch/nested-async-gen-await-import-source-specifier-tostring.js @@ -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); diff --git a/test/language/expressions/dynamic-import/catch/nested-async-gen-return-await-import-source-source-text-module.js b/test/language/expressions/dynamic-import/catch/nested-async-gen-return-await-import-source-source-text-module.js index 2288aacb4f..06bbf35a4f 100644 --- a/test/language/expressions/dynamic-import/catch/nested-async-gen-return-await-import-source-source-text-module.js +++ b/test/language/expressions/dynamic-import/catch/nested-async-gen-return-await-import-source-source-text-module.js @@ -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); diff --git a/test/language/expressions/dynamic-import/catch/nested-async-gen-return-await-import-source-specifier-tostring.js b/test/language/expressions/dynamic-import/catch/nested-async-gen-return-await-import-source-specifier-tostring.js index cbac8793a4..9234cb9ad2 100644 --- a/test/language/expressions/dynamic-import/catch/nested-async-gen-return-await-import-source-specifier-tostring.js +++ b/test/language/expressions/dynamic-import/catch/nested-async-gen-return-await-import-source-specifier-tostring.js @@ -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); diff --git a/test/language/expressions/dynamic-import/catch/nested-block-import-catch-import-source-source-text-module.js b/test/language/expressions/dynamic-import/catch/nested-block-import-catch-import-source-source-text-module.js index d482cd3935..ff862471af 100644 --- a/test/language/expressions/dynamic-import/catch/nested-block-import-catch-import-source-source-text-module.js +++ b/test/language/expressions/dynamic-import/catch/nested-block-import-catch-import-source-source-text-module.js @@ -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); }; diff --git a/test/language/expressions/dynamic-import/catch/nested-block-import-catch-import-source-specifier-tostring.js b/test/language/expressions/dynamic-import/catch/nested-block-import-catch-import-source-specifier-tostring.js index fc5b7a6921..c967f08fcc 100644 --- a/test/language/expressions/dynamic-import/catch/nested-block-import-catch-import-source-specifier-tostring.js +++ b/test/language/expressions/dynamic-import/catch/nested-block-import-catch-import-source-specifier-tostring.js @@ -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); }; diff --git a/test/language/expressions/dynamic-import/catch/nested-block-labeled-import-source-source-text-module.js b/test/language/expressions/dynamic-import/catch/nested-block-labeled-import-source-source-text-module.js index 0708790c9d..9e750f033b 100644 --- a/test/language/expressions/dynamic-import/catch/nested-block-labeled-import-source-source-text-module.js +++ b/test/language/expressions/dynamic-import/catch/nested-block-labeled-import-source-source-text-module.js @@ -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); }; diff --git a/test/language/expressions/dynamic-import/catch/nested-block-labeled-import-source-specifier-tostring.js b/test/language/expressions/dynamic-import/catch/nested-block-labeled-import-source-specifier-tostring.js index 294af99722..526173bcfa 100644 --- a/test/language/expressions/dynamic-import/catch/nested-block-labeled-import-source-specifier-tostring.js +++ b/test/language/expressions/dynamic-import/catch/nested-block-labeled-import-source-specifier-tostring.js @@ -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); }; diff --git a/test/language/expressions/dynamic-import/catch/nested-do-while-import-source-source-text-module.js b/test/language/expressions/dynamic-import/catch/nested-do-while-import-source-source-text-module.js index e6adfdfcd8..2ea1466c4e 100644 --- a/test/language/expressions/dynamic-import/catch/nested-do-while-import-source-source-text-module.js +++ b/test/language/expressions/dynamic-import/catch/nested-do-while-import-source-source-text-module.js @@ -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); diff --git a/test/language/expressions/dynamic-import/catch/nested-do-while-import-source-specifier-tostring.js b/test/language/expressions/dynamic-import/catch/nested-do-while-import-source-specifier-tostring.js index 0690a317f0..9fa2133e7b 100644 --- a/test/language/expressions/dynamic-import/catch/nested-do-while-import-source-specifier-tostring.js +++ b/test/language/expressions/dynamic-import/catch/nested-do-while-import-source-specifier-tostring.js @@ -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); diff --git a/test/language/expressions/dynamic-import/catch/nested-else-import-catch-import-source-source-text-module.js b/test/language/expressions/dynamic-import/catch/nested-else-import-catch-import-source-source-text-module.js index 2afab9e6f5..0a09f0e6c4 100644 --- a/test/language/expressions/dynamic-import/catch/nested-else-import-catch-import-source-source-text-module.js +++ b/test/language/expressions/dynamic-import/catch/nested-else-import-catch-import-source-source-text-module.js @@ -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); } diff --git a/test/language/expressions/dynamic-import/catch/nested-else-import-catch-import-source-specifier-tostring.js b/test/language/expressions/dynamic-import/catch/nested-else-import-catch-import-source-specifier-tostring.js index b3d0802281..c874ccc4a1 100644 --- a/test/language/expressions/dynamic-import/catch/nested-else-import-catch-import-source-specifier-tostring.js +++ b/test/language/expressions/dynamic-import/catch/nested-else-import-catch-import-source-specifier-tostring.js @@ -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); } diff --git a/test/language/expressions/dynamic-import/catch/nested-function-import-catch-import-source-source-text-module.js b/test/language/expressions/dynamic-import/catch/nested-function-import-catch-import-source-source-text-module.js index 9117f41c5c..aa92b8a8d7 100644 --- a/test/language/expressions/dynamic-import/catch/nested-function-import-catch-import-source-source-text-module.js +++ b/test/language/expressions/dynamic-import/catch/nested-function-import-catch-import-source-source-text-module.js @@ -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); } diff --git a/test/language/expressions/dynamic-import/catch/nested-function-import-catch-import-source-specifier-tostring.js b/test/language/expressions/dynamic-import/catch/nested-function-import-catch-import-source-specifier-tostring.js index 72f2a07756..937401568e 100644 --- a/test/language/expressions/dynamic-import/catch/nested-function-import-catch-import-source-specifier-tostring.js +++ b/test/language/expressions/dynamic-import/catch/nested-function-import-catch-import-source-specifier-tostring.js @@ -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); } diff --git a/test/language/expressions/dynamic-import/catch/nested-if-import-catch-import-source-source-text-module.js b/test/language/expressions/dynamic-import/catch/nested-if-import-catch-import-source-source-text-module.js index 793ff344ea..81748f0d4e 100644 --- a/test/language/expressions/dynamic-import/catch/nested-if-import-catch-import-source-source-text-module.js +++ b/test/language/expressions/dynamic-import/catch/nested-if-import-catch-import-source-source-text-module.js @@ -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); } diff --git a/test/language/expressions/dynamic-import/catch/nested-if-import-catch-import-source-specifier-tostring.js b/test/language/expressions/dynamic-import/catch/nested-if-import-catch-import-source-specifier-tostring.js index 7808d69806..b676d79015 100644 --- a/test/language/expressions/dynamic-import/catch/nested-if-import-catch-import-source-specifier-tostring.js +++ b/test/language/expressions/dynamic-import/catch/nested-if-import-catch-import-source-specifier-tostring.js @@ -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); } diff --git a/test/language/expressions/dynamic-import/catch/nested-while-import-catch-import-source-source-text-module.js b/test/language/expressions/dynamic-import/catch/nested-while-import-catch-import-source-source-text-module.js index e2ec207711..8be48ee6ab 100644 --- a/test/language/expressions/dynamic-import/catch/nested-while-import-catch-import-source-source-text-module.js +++ b/test/language/expressions/dynamic-import/catch/nested-while-import-catch-import-source-source-text-module.js @@ -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); }; diff --git a/test/language/expressions/dynamic-import/catch/nested-while-import-catch-import-source-specifier-tostring.js b/test/language/expressions/dynamic-import/catch/nested-while-import-catch-import-source-specifier-tostring.js index 2886633ea9..645a75e373 100644 --- a/test/language/expressions/dynamic-import/catch/nested-while-import-catch-import-source-specifier-tostring.js +++ b/test/language/expressions/dynamic-import/catch/nested-while-import-catch-import-source-specifier-tostring.js @@ -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); }; diff --git a/test/language/expressions/dynamic-import/catch/top-level-import-catch-import-source-source-text-module.js b/test/language/expressions/dynamic-import/catch/top-level-import-catch-import-source-source-text-module.js index 9ba2397f2c..6fcbfa6d1f 100644 --- a/test/language/expressions/dynamic-import/catch/top-level-import-catch-import-source-source-text-module.js +++ b/test/language/expressions/dynamic-import/catch/top-level-import-catch-import-source-source-text-module.js @@ -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); diff --git a/test/language/expressions/dynamic-import/catch/top-level-import-catch-import-source-specifier-tostring.js b/test/language/expressions/dynamic-import/catch/top-level-import-catch-import-source-specifier-tostring.js index c08ec3d442..62e29fe3e4 100644 --- a/test/language/expressions/dynamic-import/catch/top-level-import-catch-import-source-specifier-tostring.js +++ b/test/language/expressions/dynamic-import/catch/top-level-import-catch-import-source-specifier-tostring.js @@ -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); diff --git a/test/staging/source-phase-imports/import-source-source-text-module.js b/test/staging/source-phase-imports/import-source-source-text-module.js index b074396979..0c1dd86b01 100644 --- a/test/staging/source-phase-imports/import-source-source-text-module.js +++ b/test/staging/source-phase-imports/import-source-source-text-module.js @@ -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"); });