diff options
author | Marvin Hagemeister <marvin@deno.com> | 2024-09-14 23:30:06 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-14 23:30:06 +0200 |
commit | 597f2d8d4d9b91ee586b9787d6ba52d247e4ff87 (patch) | |
tree | 82bfa7272208b81b34e79572f3c9a5bcc6c4658f /tests/unit/serve_test.ts | |
parent | af2d992ecd2b9320072164b6ee295c31a3194406 (diff) |
feat: print `Listening on` messages on stderr instead of stdout (#25491)
Fixes https://github.com/denoland/deno/issues/25114
---------
Signed-off-by: Leo Kettmeir <crowlkats@toaxl.com>
Co-authored-by: Bartek IwaĆczuk <biwanczuk@gmail.com>
Co-authored-by: crowlkats <crowlkats@toaxl.com>
Co-authored-by: Nathan Whitaker <17734409+nathanwhit@users.noreply.github.com>
Diffstat (limited to 'tests/unit/serve_test.ts')
-rw-r--r-- | tests/unit/serve_test.ts | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/unit/serve_test.ts b/tests/unit/serve_test.ts index 4a19d8df2..c1e217a11 100644 --- a/tests/unit/serve_test.ts +++ b/tests/unit/serve_test.ts @@ -792,8 +792,8 @@ Deno.test( async function httpServerDefaultOnListenCallback() { const ac = new AbortController(); - const consoleLog = console.log; - console.log = (msg) => { + const consoleError = console.error; + console.error = (msg) => { try { const match = msg.match( /Listening on http:\/\/(localhost|0\.0\.0\.0):(\d+)\//, @@ -818,7 +818,7 @@ Deno.test( await server.finished; } finally { - console.log = consoleLog; + console.error = consoleError; } }, ); @@ -875,8 +875,8 @@ Deno.test({ permissions: { net: true } }, async function ipv6Hostname() { const ac = new AbortController(); let url = ""; - const consoleLog = console.log; - console.log = (msg) => { + const consoleError = console.error; + console.error = (msg) => { try { const match = msg.match(/Listening on (http:\/\/(.*?):(\d+)\/)/); assert(!!match, `Didn't match ${msg}`); @@ -897,7 +897,7 @@ Deno.test({ permissions: { net: true } }, async function ipv6Hostname() { assert(new URL(url), `Not a valid URL "${url}"`); await server.shutdown(); } finally { - console.log = consoleLog; + console.error = consoleError; } }); |