aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2022-10-12 01:47:48 -0700
committerGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2022-10-12 01:47:48 -0700
commit75e8c4699c5a85bdf6dafb15506a59b4bfc79c43 (patch)
treee581d14a18451e1683b832b37696e07949043498
parent8fcb0ff0b6cc6e00566af3db40b7836949f03266 (diff)
downloadbun-75e8c4699c5a85bdf6dafb15506a59b4bfc79c43.tar.gz
bun-75e8c4699c5a85bdf6dafb15506a59b4bfc79c43.tar.zst
bun-75e8c4699c5a85bdf6dafb15506a59b4bfc79c43.zip
Fix test bug
-rw-r--r--test/bun.js/body-stream.test.ts7
1 files changed, 4 insertions, 3 deletions
diff --git a/test/bun.js/body-stream.test.ts b/test/bun.js/body-stream.test.ts
index e513ce7cb..ec0130fbf 100644
--- a/test/bun.js/body-stream.test.ts
+++ b/test/bun.js/body-stream.test.ts
@@ -178,11 +178,9 @@ async function runInServer(
cb: (url: string) => void | Promise<void>
) {
var server;
- var thisPort = port++;
- if (port > 4120) port = 4020;
server = Bun.serve({
...opts,
- port: thisPort,
+ port: port++,
fetch(req) {
try {
return opts.fetch(req);
@@ -205,6 +203,9 @@ async function runInServer(
} finally {
server && server.stop();
server = undefined;
+ if (port > 4200) {
+ port = 4120;
+ }
}
}