aboutsummaryrefslogtreecommitdiffstats
path: root/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/non-object.any.js
diff options
context:
space:
mode:
authorWPT Sync Bot <josh+wptsync@joshmatthews.net>2019-05-22 10:24:35 +0000
committerWPT Sync Bot <josh+wptsync@joshmatthews.net>2019-05-22 14:00:10 +0000
commit5e5eccabf885cfc749a3bcb8a757be52ca0663f6 (patch)
treee4702492619d2a77086c5329a4108a5f9ed7e836 /tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/non-object.any.js
parent415b26e4f11b25b317a37c406c1d6f1fc3709561 (diff)
downloadservo-5e5eccabf885cfc749a3bcb8a757be52ca0663f6.tar.gz
servo-5e5eccabf885cfc749a3bcb8a757be52ca0663f6.zip
Update web-platform-tests to revision e426a6933a05bf144eba06a1d4c47ba876a4e2d1
Diffstat (limited to 'tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/non-object.any.js')
-rw-r--r--tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/non-object.any.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/non-object.any.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/non-object.any.js
new file mode 100644
index 00000000000..398da56595f
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/non-object.any.js
@@ -0,0 +1,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");
+