aboutsummaryrefslogtreecommitdiffstats
path: root/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/non-object.any.js
blob: 398da56595f0f16210dac4f3deeddb2cd7473d65 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// META: global=window,worker

for (const value of [null, true, false, "string"]) {
  promise_test(async t => {
    const result = await import(`./${value}.json`);
    assert_equals(result, value);
  }, `Non-object: ${value}`);
}

promise_test(async t => {
  const result = await import("./array.json");
  assert_array_equals(result, ["en", "try"]);
}, "Non-object: array");