summaryrefslogtreecommitdiff
path: root/cli/tests/testdata/test/steps/passing_steps.ts
diff options
context:
space:
mode:
authorAsher Gomez <ashersaupingomez@gmail.com>2023-11-22 22:11:20 +1100
committerGitHub <noreply@github.com>2023-11-22 12:11:20 +0100
commit616354e76cba0be8af20a0ffefeacfcf6101bafc (patch)
treec832c81dd93498e196840c8d59c0a4ab76396d07 /cli/tests/testdata/test/steps/passing_steps.ts
parent0ffcb46e0f60110c07e21151db6066f5a1b5f710 (diff)
refactor: replace `deferred()` from `std/async` with `Promise.withResolvers()` (#21234)
Closes #21041 --------- Signed-off-by: Asher Gomez <ashersaupingomez@gmail.com>
Diffstat (limited to 'cli/tests/testdata/test/steps/passing_steps.ts')
-rw-r--r--cli/tests/testdata/test/steps/passing_steps.ts6
1 files changed, 2 insertions, 4 deletions
diff --git a/cli/tests/testdata/test/steps/passing_steps.ts b/cli/tests/testdata/test/steps/passing_steps.ts
index 38de116a7..fd145954b 100644
--- a/cli/tests/testdata/test/steps/passing_steps.ts
+++ b/cli/tests/testdata/test/steps/passing_steps.ts
@@ -1,5 +1,3 @@
-import { deferred } from "../../../../../test_util/std/async/deferred.ts";
-
Deno.test("description", async (t) => {
const success = await t.step("step 1", async (t) => {
await t.step("inner 1", () => {});
@@ -107,9 +105,9 @@ Deno.test("steps buffered then streaming reporting", async (t) => {
name: "step 1",
fn: async (t) => {
// also ensure the buffered tests display in order regardless of the second one finishing first
- const step2Finished = deferred();
+ const step2Finished = Promise.withResolvers<void>();
const step1 = t.step("step 1 - 1", async () => {
- await step2Finished;
+ await step2Finished.promise;
});
const step2 = t.step("step 1 - 2", async (t) => {
await t.step("step 1 - 2 - 1", () => {});