Add configurable manifest-driven race audio system

This commit is contained in:
larssand
2026-08-28 13:29:27 +02:00
parent 3f3b410869
commit 5f79228941
22 changed files with 1133 additions and 109 deletions

View File

@@ -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);
});