diff options
author | crowlKats <13135287+crowlKats@users.noreply.github.com> | 2020-04-05 21:49:04 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-05 15:49:04 -0400 |
commit | 6720a0dc02dc5a93472520e6d23ca033d7ec9d88 (patch) | |
tree | a058723c552f0e435afead6647860a8d03701432 /cli/js/tests/form_data_test.ts | |
parent | 2911fcc78de4624c0086e6458eff3b33465c8b5b (diff) |
feat: Add File support in FormData (#4632)
Diffstat (limited to 'cli/js/tests/form_data_test.ts')
-rw-r--r-- | cli/js/tests/form_data_test.ts | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/cli/js/tests/form_data_test.ts b/cli/js/tests/form_data_test.ts index f51a51190..b002caa2e 100644 --- a/cli/js/tests/form_data_test.ts +++ b/cli/js/tests/form_data_test.ts @@ -73,6 +73,15 @@ unitTest(function formDataParamsSetSuccess(): void { assertEquals(formData.get("e"), "null"); }); +unitTest(function fromDataUseDomFile(): void { + const formData = new FormData(); + const file = new File(["foo"], "bar", { + type: "text/plain", + }); + formData.append("file", file); + assertEquals(formData.get("file"), file); +}); + unitTest(function formDataSetEmptyBlobSuccess(): void { const formData = new FormData(); formData.set("a", new Blob([]), "blank.txt"); |