From bc036bdae770764fbdf70afd2458a977e0238fd2 Mon Sep 17 00:00:00 2001 From: Carlos Valente Date: Sun, 12 May 2024 20:11:44 +0200 Subject: [PATCH] refactor: forviging test Allow a scenario where the operation execution happens in the next millisecond --- apps/server/src/stores/__tests__/runtimeState.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/server/src/stores/__tests__/runtimeState.test.ts b/apps/server/src/stores/__tests__/runtimeState.test.ts index 3def373d30..0b312b5d09 100644 --- a/apps/server/src/stores/__tests__/runtimeState.test.ts +++ b/apps/server/src/stores/__tests__/runtimeState.test.ts @@ -168,7 +168,7 @@ describe('mutation on runtimeState', () => { load(event2, [event1, event2]); start(); newState = getState(); - expect(newState.runtime.actualStart).toBe(firstStart); + expect(newState.runtime.actualStart).toBeCloseTo(firstStart, 1); // we are over-under, the difference between the schedule and the actual start const delayBefore = event2.timeStart - newState.clock; expect(newState.runtime.offset).toBe(delayBefore);