1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-22 15:24:46 -05:00

fix(fetch): Response inspect regression (#10295)

This commit is contained in:
Aaron O'Mullan 2021-04-21 23:03:04 +02:00 committed by GitHub
parent 21372d7b25
commit 8d0e0ead51
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 1 deletions

View file

@ -50,3 +50,20 @@ unitTest({ ignore: true }, async function responseFormData() {
assert(formData instanceof FormData); assert(formData instanceof FormData);
assertEquals(formData, input); assertEquals(formData, input);
}); });
unitTest(function customInspectFunction(): void {
const response = new Response();
assertEquals(
Deno.inspect(response),
`Response {
body: null,
bodyUsed: false,
headers: Headers {},
ok: true,
redirected: false,
status: 200,
statusText: "",
url: ""
}`,
);
});

View file

@ -357,7 +357,7 @@
redirected: this.redirected, redirected: this.redirected,
status: this.status, status: this.status,
statusText: this.statusText, statusText: this.statusText,
url: this.url(), url: this.url,
}; };
return `Response ${inspect(inner)}`; return `Response ${inspect(inner)}`;
} }