mirror of
https://github.com/denoland/deno.git
synced 2024-10-29 08:58:01 -04:00
fix Headers.name and FormData.name (#5994)
This commit is contained in:
parent
0ce6394aca
commit
ecb94c06e9
4 changed files with 15 additions and 1 deletions
|
@ -137,3 +137,8 @@ export class FormDataImpl extends DomIterableMixin<
|
||||||
FormDataEntryValue,
|
FormDataEntryValue,
|
||||||
typeof FormDataBase
|
typeof FormDataBase
|
||||||
>(FormDataBase, dataSymbol) {}
|
>(FormDataBase, dataSymbol) {}
|
||||||
|
|
||||||
|
Object.defineProperty(FormDataImpl, "name", {
|
||||||
|
value: "FormData",
|
||||||
|
configurable: true,
|
||||||
|
});
|
||||||
|
|
|
@ -256,3 +256,8 @@ export class HeadersImpl extends DomIterableMixin<
|
||||||
string,
|
string,
|
||||||
typeof HeadersBase
|
typeof HeadersBase
|
||||||
>(HeadersBase, headersData) {}
|
>(HeadersBase, headersData) {}
|
||||||
|
|
||||||
|
Object.defineProperty(HeadersImpl, "name", {
|
||||||
|
value: "Headers",
|
||||||
|
configurable: true,
|
||||||
|
});
|
||||||
|
|
|
@ -6,7 +6,7 @@ import {
|
||||||
assertStrContains,
|
assertStrContains,
|
||||||
} from "./test_util.ts";
|
} from "./test_util.ts";
|
||||||
|
|
||||||
unitTest({ ignore: true }, function formDataHasCorrectNameProp(): void {
|
unitTest(function formDataHasCorrectNameProp(): void {
|
||||||
assertEquals(FormData.name, "FormData");
|
assertEquals(FormData.name, "FormData");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -10,6 +10,10 @@ const {
|
||||||
// @ts-expect-error TypeScript (as of 3.7) does not support indexing namespaces by symbol
|
// @ts-expect-error TypeScript (as of 3.7) does not support indexing namespaces by symbol
|
||||||
} = Deno[Deno.internal];
|
} = Deno[Deno.internal];
|
||||||
|
|
||||||
|
unitTest(function headersHasCorrectNameProp(): void {
|
||||||
|
assertEquals(Headers.name, "Headers");
|
||||||
|
});
|
||||||
|
|
||||||
// Logic heavily copied from web-platform-tests, make
|
// Logic heavily copied from web-platform-tests, make
|
||||||
// sure pass mostly header basic test
|
// sure pass mostly header basic test
|
||||||
// ref: https://github.com/web-platform-tests/wpt/blob/7c50c216081d6ea3c9afe553ee7b64534020a1b2/fetch/api/headers/headers-basic.html
|
// ref: https://github.com/web-platform-tests/wpt/blob/7c50c216081d6ea3c9afe553ee7b64534020a1b2/fetch/api/headers/headers-basic.html
|
||||||
|
|
Loading…
Reference in a new issue