refactor: split soundtrack chapter and drive commands

This commit is contained in:
2026-09-04 15:43:41 +03:00
parent 5250a3174c
commit b427d101fa
9 changed files with 170 additions and 136 deletions

View File

@@ -12,17 +12,19 @@ import {
describe('soundtrack transport decisions', () => {
it('starts at the intro only on Start and otherwise chooses the matching main phrase', () => {
expect(resolveInitialPlayback({
sectionId: 'start',
mood: 'open',
atStart: true,
bias: 'open',
entryPhrase: 0,
intensity: 0,
generation: 0,
})).toEqual({ kind: 'intro' });
expect(resolveInitialPlayback({
sectionId: 'infrastructure',
mood: 'shadow',
atStart: false,
bias: 'shadow',
entryPhrase: 3,
intensity: 0.5,
generation: 1,
})).toEqual({ kind: 'main', offsetSeconds: mainPhraseOffsetSeconds(3) });
expect(mainPhraseOffsetSeconds(Number.NaN)).toBe(0);