test262/test/language/import/json-via-namespace.js
Mike Pennisi e793512b55 Add tests for the "JSON modules" language proposal
https://github.com/tc39/proposal-json-modules

This proposal advanced to Stage 3 of TC39's standardization process on
2021-01-27.
2021-05-28 20:02:59 -04:00

14 lines
456 B
JavaScript

// 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: May be imported via a module namespace object
flags: [module]
features: [json-modules]
---*/
import * as ns from './json-via-namespace_FIXTURE.json' assert { type: 'json' };
assert.sameValue(Object.getOwnPropertyNames(ns).length, 1);
assert.sameValue(ns.default, 262);