summaryrefslogtreecommitdiff
path: root/cli
diff options
context:
space:
mode:
Diffstat (limited to 'cli')
-rw-r--r--cli/js/web/form_data.ts5
-rw-r--r--cli/js/web/headers.ts5
-rw-r--r--cli/tests/unit/form_data_test.ts2
-rw-r--r--cli/tests/unit/headers_test.ts4
4 files changed, 15 insertions, 1 deletions
diff --git a/cli/js/web/form_data.ts b/cli/js/web/form_data.ts
index 055694517..155f40771 100644
--- a/cli/js/web/form_data.ts
+++ b/cli/js/web/form_data.ts
@@ -137,3 +137,8 @@ export class FormDataImpl extends DomIterableMixin<
FormDataEntryValue,
typeof FormDataBase
>(FormDataBase, dataSymbol) {}
+
+Object.defineProperty(FormDataImpl, "name", {
+ value: "FormData",
+ configurable: true,
+});
diff --git a/cli/js/web/headers.ts b/cli/js/web/headers.ts
index d803f69f3..9e0a70f0d 100644
--- a/cli/js/web/headers.ts
+++ b/cli/js/web/headers.ts
@@ -256,3 +256,8 @@ export class HeadersImpl extends DomIterableMixin<
string,
typeof HeadersBase
>(HeadersBase, headersData) {}
+
+Object.defineProperty(HeadersImpl, "name", {
+ value: "Headers",
+ configurable: true,
+});
diff --git a/cli/tests/unit/form_data_test.ts b/cli/tests/unit/form_data_test.ts
index f25818eee..89f8ffa0e 100644
--- a/cli/tests/unit/form_data_test.ts
+++ b/cli/tests/unit/form_data_test.ts
@@ -6,7 +6,7 @@ import {
assertStrContains,
} from "./test_util.ts";
-unitTest({ ignore: true }, function formDataHasCorrectNameProp(): void {
+unitTest(function formDataHasCorrectNameProp(): void {
assertEquals(FormData.name, "FormData");
});
diff --git a/cli/tests/unit/headers_test.ts b/cli/tests/unit/headers_test.ts
index 6dd60c8c5..722c55fb5 100644
--- a/cli/tests/unit/headers_test.ts
+++ b/cli/tests/unit/headers_test.ts
@@ -10,6 +10,10 @@ const {
// @ts-expect-error TypeScript (as of 3.7) does not support indexing namespaces by symbol
} = Deno[Deno.internal];
+unitTest(function headersHasCorrectNameProp(): void {
+ assertEquals(Headers.name, "Headers");
+});
+
// Logic heavily copied from web-platform-tests, make
// sure pass mostly header basic test
// ref: https://github.com/web-platform-tests/wpt/blob/7c50c216081d6ea3c9afe553ee7b64534020a1b2/fetch/api/headers/headers-basic.html