summaryrefslogtreecommitdiff
path: root/cli/tests/unit_node/process_test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tests/unit_node/process_test.ts')
-rw-r--r--cli/tests/unit_node/process_test.ts5
1 files changed, 2 insertions, 3 deletions
diff --git a/cli/tests/unit_node/process_test.ts b/cli/tests/unit_node/process_test.ts
index a572f11b2..ffb95413a 100644
--- a/cli/tests/unit_node/process_test.ts
+++ b/cli/tests/unit_node/process_test.ts
@@ -13,7 +13,6 @@ import {
assertThrows,
} from "../../../test_util/std/testing/asserts.ts";
import { stripColor } from "../../../test_util/std/fmt/colors.ts";
-import { deferred } from "../../../test_util/std/async/deferred.ts";
import * as path from "../../../test_util/std/path/mod.ts";
import { delay } from "../../../test_util/std/async/delay.ts";
@@ -368,7 +367,7 @@ Deno.test({
// stdin resource is present before the test starts.
sanitizeResources: false,
async fn() {
- const promise = deferred();
+ const { promise, resolve } = Promise.withResolvers<void>();
const expected = ["foo", "bar", null, "end"];
const data: (string | null)[] = [];
@@ -385,7 +384,7 @@ Deno.test({
process.stdin.push("bar");
process.nextTick(() => {
process.stdin.push(null);
- promise.resolve();
+ resolve();
});
});