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", () => {