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:
parent
21372d7b25
commit
8d0e0ead51
2 changed files with 18 additions and 1 deletions
|
@ -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: ""
|
||||||
|
}`,
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
|
@ -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)}`;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue