Debian Codegraph @

js/src/tests/test262/language/import/import-attributes/json-via-namespace.js

raw
1 // |reftest| shell-option(--enable-import-attributes) skip-if(!xulRuntime.shell) 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 esid: sec-parse-json-module
6 description: May be imported via a module namespace object
7 flags: [module]
8 features: [import-attributes, json-modules]
9 ---*/
10
11 import * as ns from './json-via-namespace_FIXTURE.json' with { type: 'json' };
12
13 assert.sameValue(Object.getOwnPropertyNames(ns).length, 1);
14 assert.sameValue(ns.default, 262);
15
16 reportCompare(0, 0);