summaryrefslogtreecommitdiff
path: root/cli/tests/testdata/run/tls_connecttls.js
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tests/testdata/run/tls_connecttls.js')
-rw-r--r--cli/tests/testdata/run/tls_connecttls.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/cli/tests/testdata/run/tls_connecttls.js b/cli/tests/testdata/run/tls_connecttls.js
index 7c03856cb..bd1d41096 100644
--- a/cli/tests/testdata/run/tls_connecttls.js
+++ b/cli/tests/testdata/run/tls_connecttls.js
@@ -1,4 +1,3 @@
-import { deferred } from "../../../../test_util/std/async/deferred.ts";
import {
assert,
assertEquals,
@@ -9,7 +8,7 @@ import { TextProtoReader } from "./textproto.ts";
const encoder = new TextEncoder();
const decoder = new TextDecoder();
-const resolvable = deferred();
+const { promise, resolve } = Promise.withResolvers();
const hostname = "localhost";
const port = 3505;
@@ -32,7 +31,7 @@ listener.accept().then(
// TODO(bartlomieju): this might be a bug
setTimeout(() => {
conn.close();
- resolvable.resolve();
+ resolve();
}, 0);
},
);
@@ -65,6 +64,6 @@ await r.readFull(bodyBuf);
assertEquals(decoder.decode(bodyBuf), "Hello World\n");
conn.close();
listener.close();
-await resolvable;
+await promise;
console.log("DONE");