From ec44b5b6af1b70bb4041c909989b5f94138ecaf5 Mon Sep 17 00:00:00 2001 From: Yoshiya Hinosawa Date: Tue, 22 Oct 2019 22:52:41 +0900 Subject: test: improve http_proxy test (#3185) --- cli/tests/045_proxy_client.ts | 2 +- cli/tests/045_proxy_test.ts | 2 +- cli/tests/045_proxy_test.ts.out | 5 +++-- cli/tests/integration_tests.rs | 1 + 4 files changed, 6 insertions(+), 4 deletions(-) (limited to 'cli/tests') diff --git a/cli/tests/045_proxy_client.ts b/cli/tests/045_proxy_client.ts index 4fb3db83b..3d7003750 100644 --- a/cli/tests/045_proxy_client.ts +++ b/cli/tests/045_proxy_client.ts @@ -1,6 +1,6 @@ // Copyright 2018-2019 the Deno authors. All rights reserved. MIT license. async function main(): Promise { - const res = await fetch("http://deno.land/welcome.ts"); + const res = await fetch("http://localhost:4545/std/examples/colors.ts"); console.log(`Response http: ${await res.text()}`); } diff --git a/cli/tests/045_proxy_test.ts b/cli/tests/045_proxy_test.ts index f1226f4c4..6f1d779c1 100644 --- a/cli/tests/045_proxy_test.ts +++ b/cli/tests/045_proxy_test.ts @@ -49,7 +49,7 @@ async function testModuleDownload(): Promise { "--no-prompt", "--reload", "fetch", - "http://deno.land/welcome.ts" + "http://localhost:4545/std/examples/colors.ts" ], stdout: "piped", env: { diff --git a/cli/tests/045_proxy_test.ts.out b/cli/tests/045_proxy_test.ts.out index 7b898bcf1..c59f219a4 100644 --- a/cli/tests/045_proxy_test.ts.out +++ b/cli/tests/045_proxy_test.ts.out @@ -1,3 +1,4 @@ Proxy server listening on [WILDCARD] -Proxy request to: http://deno.land/welcome.ts -Proxy request to: http://deno.land/welcome.ts +Proxy request to: http://localhost:4545/std/examples/colors.ts +Proxy request to: http://localhost:4545/std/examples/colors.ts +Proxy request to: http://localhost:4545/std/fmt/colors.ts diff --git a/cli/tests/integration_tests.rs b/cli/tests/integration_tests.rs index fcf641dc0..d1b9a655e 100644 --- a/cli/tests/integration_tests.rs +++ b/cli/tests/integration_tests.rs @@ -314,6 +314,7 @@ itest!(_044_bad_resource { itest!(_045_proxy { args: "run --allow-net --allow-env --allow-run --reload 045_proxy_test.ts", output: "045_proxy_test.ts.out", + http_server: true, }); itest!(_046_tsx { -- cgit v1.2.3