json-value-string.js (761B)
1 // |reftest| module 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 a string 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-string_FIXTURE.json' with { type: 'json' }; 20 21 assert.sameValue(value, 'a string value'); 22 23 reportCompare(0, 0);