mirror of
https://github.com/denoland/deno.git
synced 2024-11-29 16:30:56 -05:00
fix(op_crates/fetch): Prevent throwing when inspecting a request (#10335)
Fixes: #10334
This commit is contained in:
parent
c5fda85ef0
commit
feb6af7732
2 changed files with 15 additions and 1 deletions
|
@ -53,3 +53,17 @@ unitTest(async function cloneRequestBodyStream(): Promise<void> {
|
|||
|
||||
assertEquals(b1, b2);
|
||||
});
|
||||
|
||||
unitTest(function customInspectFunction(): void {
|
||||
const request = new Request("https://example.com");
|
||||
assertEquals(
|
||||
Deno.inspect(request),
|
||||
`Request {
|
||||
bodyUsed: false,
|
||||
headers: Headers {},
|
||||
method: "GET",
|
||||
redirect: "follow",
|
||||
url: "https://example.com/"
|
||||
}`,
|
||||
);
|
||||
});
|
||||
|
|
|
@ -392,7 +392,7 @@
|
|||
headers: this.headers,
|
||||
method: this.method,
|
||||
redirect: this.redirect,
|
||||
url: this.url(),
|
||||
url: this.url,
|
||||
};
|
||||
return `Request ${inspect(inner)}`;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue