| // Copyright (C) 2018 Leo Balter. All rights reserved. | |
| // This code is governed by the BSD license found in the LICENSE file. | |
| /*--- | |
| desc: > | |
| import() from a module code can load a file with script code, but the target | |
| is resolved into a Module Record | |
| info: | | |
| Modules | |
| Static Semantics: Early Errors | |
| ModuleBody : ModuleItemList | |
| - It is a Syntax Error if the LexicallyDeclaredNames of ModuleItemList containsany duplicate entries. | |
| - It is a Syntax Error if any element of the LexicallyDeclaredNames of ModuleItemList also occurs in the VarDeclaredNames of ModuleItemList. | |
| template: catch | |
| flags: [module] | |
| ---*/ | |
| //- import | |
| import('./script-code_FIXTURE.js') | |
| //- body | |
| assert.sameValue(error.name, 'SyntaxError'); |