From c002ea10fa45e3c6fdb70a4c3b3add2a081b0fa5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=BF=B7=E6=B8=A1?= Date: Tue, 25 Dec 2018 00:18:01 +0800 Subject: [PATCH] fix FormData.name (#1412) --- js/form_data.ts | 4 ++-- js/form_data_test.ts | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/js/form_data.ts b/js/form_data.ts index 6626435201..6f0cadfef1 100644 --- a/js/form_data.ts +++ b/js/form_data.ts @@ -100,8 +100,8 @@ class FormDataBase { } // tslint:disable-next-line:variable-name -export const FormData = DomIterableMixin< +export class FormData extends DomIterableMixin< string, domTypes.FormDataEntryValue, typeof FormDataBase ->(FormDataBase, dataSymbol); +>(FormDataBase, dataSymbol) {} diff --git a/js/form_data_test.ts b/js/form_data_test.ts index fef61542e7..f3fbdd8724 100644 --- a/js/form_data_test.ts +++ b/js/form_data_test.ts @@ -1,6 +1,10 @@ // Copyright 2018 the Deno authors. All rights reserved. MIT license. import { test, assert, assertEqual } from "./test_util.ts"; +test(function formDataHasCorrectNameProp() { + assertEqual(FormData.name, "FormData"); +}); + test(function formDataParamsAppendSuccess() { const formData = new FormData(); formData.append("a", "true");