mirror of
https://github.com/denoland/deno.git
synced 2025-09-28 21:24:48 +00:00
formData: set default filename for Blob to <blob> (#5907)
This commit is contained in:
parent
3cbcdd4250
commit
c9bbb200d6
3 changed files with 30 additions and 3 deletions
|
@ -99,6 +99,15 @@ unitTest(function formDataSetEmptyBlobSuccess(): void {
|
|||
*/
|
||||
});
|
||||
|
||||
unitTest(function formDataBlobFilename(): void {
|
||||
const formData = new FormData();
|
||||
const content = new TextEncoder().encode("deno");
|
||||
formData.set("a", new Blob([content]));
|
||||
const file = formData.get("a");
|
||||
assert(file instanceof File);
|
||||
assertEquals(file.name, "blob");
|
||||
});
|
||||
|
||||
unitTest(function formDataParamsForEachSuccess(): void {
|
||||
const init = [
|
||||
["a", "54"],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue