diff options
author | Luca Casonato <lucacasonato@yahoo.com> | 2021-05-26 23:44:42 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-26 23:44:42 +0200 |
commit | d5d59bb794503416ced2c3ad6a2bb043f97ce3e5 (patch) | |
tree | e18b9655fedca63f068333fb1fa37297e3b0b3b7 /cli/tests/unit/fetch_test.ts | |
parent | e5beb800c94099852964d482a32a13f5c29ec147 (diff) |
fix(fetch): make prototype properties writable (#10769)
Diffstat (limited to 'cli/tests/unit/fetch_test.ts')
-rw-r--r-- | cli/tests/unit/fetch_test.ts | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/cli/tests/unit/fetch_test.ts b/cli/tests/unit/fetch_test.ts index e73953a5c..c2224083d 100644 --- a/cli/tests/unit/fetch_test.ts +++ b/cli/tests/unit/fetch_test.ts @@ -1139,3 +1139,13 @@ unitTest( assertEquals(actual, expected); }, ); + +unitTest({}, function fetchWritableRespProps(): void { + const original = new Response("https://deno.land", { + status: 404, + headers: { "x-deno": "foo" }, + }); + const new_ = new Response("https://deno.land", original); + assertEquals(original.status, new_.status); + assertEquals(new_.headers.get("x-deno"), "foo"); +}); |