Skip to content

Commit e40734e

Browse files
committed
fix tests
1 parent 385fd6a commit e40734e

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

  • packages/modules/workflow-engine-inmemory/integration-tests/__tests__

packages/modules/workflow-engine-inmemory/integration-tests/__tests__/index.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -815,16 +815,16 @@ moduleIntegrationTestRunner<IWorkflowEngineService>({
815815

816816
it("should execute a scheduled workflow", async () => {
817817
const spy = createScheduled("standard", {
818-
cron: "0 0 * * * *", // Runs at the start of every hour
818+
interval: 1000,
819819
})
820820

821821
expect(spy).toHaveBeenCalledTimes(0)
822822

823-
await jest.runOnlyPendingTimersAsync()
823+
await jest.advanceTimersByTimeAsync(1100)
824824

825825
expect(spy).toHaveBeenCalledTimes(1)
826826

827-
await jest.runOnlyPendingTimersAsync()
827+
await jest.advanceTimersByTimeAsync(1100)
828828

829829
expect(spy).toHaveBeenCalledTimes(2)
830830
})

0 commit comments

Comments
 (0)