mirror of
https://github.com/denoland/deno.git
synced 2025-09-26 12:19:12 +00:00
Merge deno_cli_snapshots into deno_cli (#3064)
This commit is contained in:
parent
9049213867
commit
b81e5db17a
148 changed files with 38 additions and 83 deletions
17
cli/js/request_test.ts
Normal file
17
cli/js/request_test.ts
Normal file
|
@ -0,0 +1,17 @@
|
|||
// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.
|
||||
import { test, assertEquals } from "./test_util.ts";
|
||||
|
||||
test(function fromInit(): void {
|
||||
const req = new Request("https://example.com", {
|
||||
body: "ahoyhoy",
|
||||
method: "POST",
|
||||
headers: {
|
||||
"test-header": "value"
|
||||
}
|
||||
});
|
||||
|
||||
// @ts-ignore
|
||||
assertEquals("ahoyhoy", req._bodySource);
|
||||
assertEquals(req.url, "https://example.com");
|
||||
assertEquals(req.headers.get("test-header"), "value");
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue