mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-14 03:43:50 +00:00
trigger doRoll if clock is less than startAt
This commit is contained in:
@@ -703,4 +703,24 @@ describe('typical scenarios', () => {
|
||||
|
||||
expect(updateRoll(timers)).toStrictEqual(expected);
|
||||
});
|
||||
|
||||
it('rolls backwards', () => {
|
||||
const timers = {
|
||||
selectedEventId: '1',
|
||||
current: 11,
|
||||
_startAt: 10,
|
||||
_finishAt: 15,
|
||||
clock: 9,
|
||||
secondaryTimer: null,
|
||||
secondaryTarget: null,
|
||||
};
|
||||
|
||||
const expected = {
|
||||
updatedTimer: timers._finishAt - timers.clock,
|
||||
updatedSecondaryTimer: null,
|
||||
doRollLoad: true,
|
||||
isFinished: false,
|
||||
};
|
||||
expect(updateRoll(timers)).toStrictEqual(expected);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user