From 0000ae63053c88b7ba1ded7d87ca65e38dc0b364 Mon Sep 17 00:00:00 2001 From: nigiri <168690269+0xnigir1@users.noreply.github.com> Date: Thu, 31 Oct 2024 17:20:35 -0300 Subject: [PATCH] fix: hanging tests --- packages/data-flow/test/unit/orchestrator.spec.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/data-flow/test/unit/orchestrator.spec.ts b/packages/data-flow/test/unit/orchestrator.spec.ts index a3b94bc..d78276a 100644 --- a/packages/data-flow/test/unit/orchestrator.spec.ts +++ b/packages/data-flow/test/unit/orchestrator.spec.ts @@ -104,10 +104,11 @@ describe("Orchestrator", { sequential: true }, () => { ); }); - afterAll(() => { + afterAll(async () => { vi.clearAllMocks(); - return new Promise((resolve) => setImmediate(resolve)); + // Wait for any pending promises to resolve + await new Promise((resolve) => setImmediate(resolve)); }); describe("Event Processing Flow", () => {