aboutsummaryrefslogtreecommitdiffstats
path: root/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/non-object.tentative.any.js
diff options
context:
space:
mode:
authorWPT Sync Bot <josh+wptsync@joshmatthews.net>2019-10-03 10:23:35 +0000
committerWPT Sync Bot <josh+wptsync@joshmatthews.net>2019-10-03 13:25:50 +0000
commit555167ffdb0067e0b2491a255e0ea7d61f0ad7a8 (patch)
tree1ebb2587439e98845338f0697c21fce0ae4bd376 /tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/non-object.tentative.any.js
parent78438113d4ee6838c1f630f4ac0cdb2b157e8781 (diff)
downloadservo-555167ffdb0067e0b2491a255e0ea7d61f0ad7a8.tar.gz
servo-555167ffdb0067e0b2491a255e0ea7d61f0ad7a8.zip
Update web-platform-tests to revision 3564c21f260aeb6862ceaa56bee9c39b74db3440
Diffstat (limited to 'tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/non-object.tentative.any.js')
-rw-r--r--tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/non-object.tentative.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.tentative.any.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/non-object.tentative.any.js
new file mode 100644
index 00000000000..dcbe60f2c2f
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/non-object.tentative.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.default, value);
+ }, `Non-object: ${value}`);
+}
+
+promise_test(async t => {
+ const result = await import("./array.json");
+ assert_array_equals(result.default, ["en", "try"]);
+}, "Non-object: array");
+