mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-16 12:53:32 +00:00
add relevantBlock function (#1100)
* feat: current block * pass full rundown to functions and use filter utils
This commit is contained in:
committed by
GitHub
parent
20838c038a
commit
158ef05ff0
@@ -98,6 +98,7 @@ describe('mutation on runtimeState', () => {
|
||||
expect(newState.eventNow?.id).toBe(mockEvent.id);
|
||||
expect(newState.timer.playback).toBe(Playback.Armed);
|
||||
expect(newState.clock).not.toBe(666);
|
||||
expect(newState.currentBlock.block).toBeNull();
|
||||
|
||||
// 2. Start event
|
||||
let success = start();
|
||||
@@ -171,6 +172,7 @@ describe('mutation on runtimeState', () => {
|
||||
expect(newState.runtime.actualStart).toBeNull();
|
||||
expect(newState.runtime.plannedStart).toBe(0);
|
||||
expect(newState.runtime.plannedEnd).toBe(1500);
|
||||
expect(newState.currentBlock.block).toBeNull();
|
||||
|
||||
// 2. Start event
|
||||
start();
|
||||
@@ -202,6 +204,7 @@ describe('mutation on runtimeState', () => {
|
||||
expect(newState.runtime.offset).toBe(delayBefore);
|
||||
// finish is the difference between the runtime and the schedule
|
||||
expect(newState.runtime.expectedEnd).toBe(event2.timeEnd - newState.runtime.offset);
|
||||
expect(newState.currentBlock.block).toBeNull();
|
||||
|
||||
// 4. Add time
|
||||
addTime(10);
|
||||
|
||||
Reference in New Issue
Block a user