refactor: forviging test

Allow a scenario where the operation execution happens in the next millisecond
This commit is contained in:
Carlos Valente
2024-05-12 20:11:44 +02:00
committed by Carlos Valente
parent 266a84e5d3
commit bc036bdae7
@@ -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);