summaryrefslogtreecommitdiff
path: root/cli/js/fetch_test.ts
diff options
context:
space:
mode:
authorRy Dahl <ry@tinyclouds.org>2019-10-31 22:33:27 -0400
committerBert Belder <bertbelder@gmail.com>2019-10-31 19:33:27 -0700
commitaf61dbed874863db308f3a421ad142a7f106687a (patch)
tree083946a0071ddf4ddde51df54064ce8b56d1e812 /cli/js/fetch_test.ts
parent9d6cbb73a8dcf63b24630129f47dc98d3cc735d5 (diff)
Upgrade node_modules, change tagline, clean up root directory (#3247)
* Upgrade node_modules * Simplify tagline * Move gclient_config.py out of root * Move package.json to tools * Remove yarn.lock * Remove CONTRIBUTING.md
Diffstat (limited to 'cli/js/fetch_test.ts')
-rw-r--r--cli/js/fetch_test.ts18
1 files changed, 9 insertions, 9 deletions
diff --git a/cli/js/fetch_test.ts b/cli/js/fetch_test.ts
index 56c693681..1b9450dcd 100644
--- a/cli/js/fetch_test.ts
+++ b/cli/js/fetch_test.ts
@@ -21,7 +21,7 @@ testPerm({ net: true }, async function fetchConnectionError(): Promise<void> {
});
testPerm({ net: true }, async function fetchJsonSuccess(): Promise<void> {
- const response = await fetch("http://localhost:4545/package.json");
+ const response = await fetch("http://localhost:4545/cli/tests/fixture.json");
const json = await response.json();
assertEquals(json.name, "deno");
});
@@ -29,7 +29,7 @@ testPerm({ net: true }, async function fetchJsonSuccess(): Promise<void> {
test(async function fetchPerm(): Promise<void> {
let err;
try {
- await fetch("http://localhost:4545/package.json");
+ await fetch("http://localhost:4545/cli/tests/fixture.json");
} catch (err_) {
err = err_;
}
@@ -38,19 +38,19 @@ test(async function fetchPerm(): Promise<void> {
});
testPerm({ net: true }, async function fetchUrl(): Promise<void> {
- const response = await fetch("http://localhost:4545/package.json");
- assertEquals(response.url, "http://localhost:4545/package.json");
+ const response = await fetch("http://localhost:4545/cli/tests/fixture.json");
+ assertEquals(response.url, "http://localhost:4545/cli/tests/fixture.json");
});
testPerm({ net: true }, async function fetchHeaders(): Promise<void> {
- const response = await fetch("http://localhost:4545/package.json");
+ const response = await fetch("http://localhost:4545/cli/tests/fixture.json");
const headers = response.headers;
assertEquals(headers.get("Content-Type"), "application/json");
assert(headers.get("Server").startsWith("SimpleHTTP"));
});
testPerm({ net: true }, async function fetchBlob(): Promise<void> {
- const response = await fetch("http://localhost:4545/package.json");
+ const response = await fetch("http://localhost:4545/cli/tests/fixture.json");
const headers = response.headers;
const blob = await response.blob();
assertEquals(blob.type, headers.get("Content-Type"));
@@ -58,7 +58,7 @@ testPerm({ net: true }, async function fetchBlob(): Promise<void> {
});
testPerm({ net: true }, async function fetchBodyUsed(): Promise<void> {
- const response = await fetch("http://localhost:4545/package.json");
+ const response = await fetch("http://localhost:4545/cli/tests/fixture.json");
assertEquals(response.bodyUsed, false);
assertThrows(
(): void => {
@@ -71,7 +71,7 @@ testPerm({ net: true }, async function fetchBodyUsed(): Promise<void> {
});
testPerm({ net: true }, async function fetchAsyncIterator(): Promise<void> {
- const response = await fetch("http://localhost:4545/package.json");
+ const response = await fetch("http://localhost:4545/cli/tests/fixture.json");
const headers = response.headers;
let total = 0;
for await (const chunk of response.body) {
@@ -82,7 +82,7 @@ testPerm({ net: true }, async function fetchAsyncIterator(): Promise<void> {
});
testPerm({ net: true }, async function responseClone(): Promise<void> {
- const response = await fetch("http://localhost:4545/package.json");
+ const response = await fetch("http://localhost:4545/cli/tests/fixture.json");
const response1 = response.clone();
assert(response !== response1);
assertEquals(response.status, response1.status);