Debian Codegraph @

js/src/tests/test262/language/module-code/import-attributes/import-attribute-trlng-comma.js

raw
1 // |reftest| shell-option(--enable-import-attributes) skip-if(!xulRuntime.shell) error:SyntaxError module -- requires shell-options
2 // Copyright (C) 2021 the V8 project authors. All rights reserved.
3 // This code is governed by the BSD license found in the LICENSE file.
4 /*---
5 description: >
6 WithClause in ImportDeclaration may contain a trailing comma
7 esid: sec-modules
8 info: |
9 ImportDeclaration:
10 import ModuleSpecifier[no LineTerminator here] WithClause;
11
12 WithClause:
13 AttributesKeyword {}
14 AttributesKeyword {WithEntries ,opt}
15
16 WithEntries:
17 AttributeKey : StringLiteral
18 AttributeKey : StringLiteral , WithEntries
19
20 AttributeKey:
21 IdentifierName
22 StringLiteral
23 negative:
24 phase: resolution
25 type: SyntaxError
26 features: [import-attributes, globalThis]
27 flags: [module]
28 ---*/
29
30 $DONOTEVALUATE();
31
32 import "./ensure-linking-error_FIXTURE.js";
33
34 import x from './import-attribute-1_FIXTURE.js' with {test262:'',};
35 import './import-attribute-2_FIXTURE.js' with {test262:'',};
36 export * from './import-attribute-3_FIXTURE.js' with {test262:'',};