mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-21 15:09:10 +00:00
refactor: forgiving test
This commit is contained in:
committed by
Carlos Valente
parent
13aeeb278d
commit
2394eced93
@@ -168,7 +168,7 @@ describe('mutation on runtimeState', () => {
|
|||||||
load(event2, [event1, event2]);
|
load(event2, [event1, event2]);
|
||||||
start();
|
start();
|
||||||
newState = getState();
|
newState = getState();
|
||||||
expect(newState.runtime.actualStart).toBeCloseTo(firstStart, 1);
|
expect(newState.runtime.actualStart).toBeCloseTo(firstStart, 2);
|
||||||
// we are over-under, the difference between the schedule and the actual start
|
// we are over-under, the difference between the schedule and the actual start
|
||||||
const delayBefore = event2.timeStart - newState.clock;
|
const delayBefore = event2.timeStart - newState.clock;
|
||||||
expect(newState.runtime.offset).toBe(delayBefore);
|
expect(newState.runtime.offset).toBe(delayBefore);
|
||||||
|
|||||||
Reference in New Issue
Block a user