json-via-namespace.js 475 B

12345678910111213
  1. // Copyright (C) 2021 the V8 project authors. All rights reserved.
  2. // This code is governed by the BSD license found in the LICENSE file.
  3. /*---
  4. esid: sec-parse-json-module
  5. description: May be imported via a module namespace object
  6. flags: [module]
  7. features: [import-assertions, json-modules]
  8. ---*/
  9. import * as ns from './json-via-namespace_FIXTURE.json' assert { type: 'json' };
  10. assert.sameValue(Object.getOwnPropertyNames(ns).length, 1);
  11. assert.sameValue(ns.default, 262);