summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/language/import/import-attributes/json-named-bindings.js
blob: 2654cd6d7ad6ee5168114a53d31877eea38d72db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// |reftest| shell-option(--enable-import-attributes) skip-if(!xulRuntime.shell) error:SyntaxError module -- requires shell-options
// Copyright (C) 2021 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-parse-json-module
description: Does not define named bindings
info: |
  In the early design of JSON modules, contributors considered allowing the
  properties of object values in JSON modules to be imported directly by name.
  This was ultimately rejected, so attempting to import in this way should
  produce a SyntaxError.
flags: [module]
features: [import-attributes, json-modules]
negative:
  phase: parse
  type: SyntaxError
---*/

$DONOTEVALUATE();

import {name} from './json-named-bindings_FIXTURE.json' with { type: 'json' };