summaryrefslogtreecommitdiff
path: root/tests/unit/net_test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit/net_test.ts')
-rw-r--r--tests/unit/net_test.ts4
1 files changed, 1 insertions, 3 deletions
diff --git a/tests/unit/net_test.ts b/tests/unit/net_test.ts
index c243da47f..cfa42b3d3 100644
--- a/tests/unit/net_test.ts
+++ b/tests/unit/net_test.ts
@@ -126,8 +126,6 @@ Deno.test(
const listener = Deno.listen({ port: listenPort });
const p = listener.accept();
listener.close();
- // TODO(piscisaureus): the error type should be `Interrupted` here, which
- // gets thrown, but then ext/net catches it and rethrows `BadResource`.
await assertRejects(
() => p,
Deno.errors.BadResource,
@@ -168,7 +166,7 @@ Deno.test(
} else if (e.message === "Another accept task is ongoing") {
acceptErrCount++;
} else {
- throw new Error("Unexpected error message");
+ throw e;
}
};
const p = listener.accept().catch(checkErr);