From 555167ffdb0067e0b2491a255e0ea7d61f0ad7a8 Mon Sep 17 00:00:00 2001 From: WPT Sync Bot Date: Thu, 3 Oct 2019 10:23:35 +0000 Subject: Update web-platform-tests to revision 3564c21f260aeb6862ceaa56bee9c39b74db3440 --- .../json-module/non-object.tentative.any.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/non-object.tentative.any.js (limited to 'tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/non-object.tentative.any.js') 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"); + -- cgit v1.2.3