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