non-object.any.js (470B)
1 // META: global=window,dedicatedworker,sharedworker 2 3 for (const value of [null, true, false, "string"]) { 4 promise_test(async t => { 5 const result = await import(`./${value}.json`, { with: { type: "json" } }); 6 assert_equals(result.default, value); 7 }, `Non-object: ${value}`); 8 } 9 10 promise_test(async t => { 11 const result = await import("./array.json", { with: { type: "json" } }); 12 assert_array_equals(result.default, ["en", "try"]); 13 }, "Non-object: array");