summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/xhr/formdata/constructor.any.js
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/xhr/formdata/constructor.any.js')
-rw-r--r--testing/web-platform/tests/xhr/formdata/constructor.any.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/testing/web-platform/tests/xhr/formdata/constructor.any.js b/testing/web-platform/tests/xhr/formdata/constructor.any.js
new file mode 100644
index 0000000000..43704538ab
--- /dev/null
+++ b/testing/web-platform/tests/xhr/formdata/constructor.any.js
@@ -0,0 +1,6 @@
+// META: title=FormData: constructor
+
+test(() => {
+ assert_throws_js(TypeError, () => { new FormData(null); });
+ assert_throws_js(TypeError, () => { new FormData("string"); });
+}, "Constructors should throw a type error");