Add configurable manifest-driven race audio system
This commit is contained in:
@@ -447,3 +447,13 @@ test("session channel statistics summarize splits and pit stops per competitor",
|
||||
assert.equal(stats.competitors[0].bestPitStopMs, 9000);
|
||||
assert.equal(stats.pitStops[1].driverName, "Driver Two");
|
||||
});
|
||||
|
||||
test("paused session timing freezes and resumes without counting the pause", () => {
|
||||
const getSessionTargetMs = () => 300_000;
|
||||
const paused = getSessionTiming({ startedAt: 1_000, pausedAt: 61_000, totalPausedMs: 0, followUpSec: 0 }, 121_000, { getSessionTargetMs });
|
||||
assert.equal(paused.elapsedMs, 60_000);
|
||||
assert.equal(paused.remainingMs, 240_000);
|
||||
const resumed = getSessionTiming({ startedAt: 1_000, pausedAt: null, totalPausedMs: 60_000, followUpSec: 0 }, 121_000, { getSessionTargetMs });
|
||||
assert.equal(resumed.elapsedMs, 60_000);
|
||||
assert.equal(resumed.remainingMs, 240_000);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user