Debian Codegraph @

js/src/tests/test262/language/import/import-attributes/json-value-null.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: Correctly parses the JSON representation of null
7 info: |
8 # 1.4 ParseJSONModule ( source )
9
10 The abstract operation ParseJSONModule takes a single argument source which
11 is a String representing the contents of a module.
12
13 1. Let json be ? Call(%JSON.parse%, undefined, « source »).
14 2. Return CreateDefaultExportSyntheticModule(json).
15 flags: [module]
16 features: [import-attributes, json-modules]
17 ---*/
18
19 import value from './json-value-null_FIXTURE.json' with { type: 'json' };
20
21 assert.sameValue(value, null);
22
23 reportCompare(0, 0);