summaryrefslogtreecommitdiff
path: root/cli/js/net_test.ts
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2020-03-03 18:22:53 +0100
committerGitHub <noreply@github.com>2020-03-03 18:22:53 +0100
commitee452ad883c1c711839655a307b39e8eea5bf410 (patch)
tree2812a5201beb2b52c92d6e3c958f2288b0253b68 /cli/js/net_test.ts
parent4dc004f0a24fdc81026ec03326b9943a95f1a31d (diff)
add assertOps sanitizer in cli/js/ unit tests (#4209)
* add "assertOps" test assertion which makes sure test case is not "leaking" ops - ie. after test finishes there are no pending async ops * apply "assertOps" to all tests in "cli/js/" * fix numerous tests leaking ops * document problem with edge case in "clearInterval" and "clearTimeout" implementation where they may leak async ops * move "cli/js/worker_test.ts" to "cli/tests/worker_test.ts" and run as integration test; workers leak ops because of missing "terminate" implementation
Diffstat (limited to 'cli/js/net_test.ts')
-rw-r--r--cli/js/net_test.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/cli/js/net_test.ts b/cli/js/net_test.ts
index 8a53a1c74..41d012c56 100644
--- a/cli/js/net_test.ts
+++ b/cli/js/net_test.ts
@@ -54,7 +54,7 @@ testPerm({ net: true }, async function netTcpConcurrentAccept(): Promise<void> {
const p1 = listener.accept().catch(checkErr);
await Promise.race([p, p1]);
listener.close();
- await [p, p1];
+ await Promise.all([p, p1]);
assertEquals(acceptErrCount, 1);
});