diff options
author | Luca Casonato <lucacasonato@yahoo.com> | 2021-05-26 23:44:42 +0200 |
---|---|---|
committer | Bert Belder <bertbelder@gmail.com> | 2021-05-31 16:37:34 +0200 |
commit | 379d40955a46e3f1e5113aee3b4781e66d02c8e0 (patch) | |
tree | d4bd7d5b14b236d064898f78c11ff53cc6d35ad1 /cli/tests | |
parent | 8a19f28a005083bec61816f171482f538464043d (diff) |
fix(fetch): make prototype properties writable (#10769)
Diffstat (limited to 'cli/tests')
-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"); +}); |