test(timeout): copri toggleTimeout e listSpotVideos

- gameState: stato iniziale `timeout: false` e ciclo toggleTimeout.
- nuovo spotUtils.test.js: cartella assente/vuota, filtro .mp4 ordinato,
  estensione case-insensitive.
This commit is contained in:
2026-06-21 18:35:20 +02:00
parent fb4b14b282
commit 68a5f9317e
2 changed files with 50 additions and 0 deletions
+12
View File
@@ -79,6 +79,10 @@ describe('Game Logic (gameState.js)', () => {
expect(state.visuForm).toBe(false)
expect(state.visuStriscia).toBe(true)
})
it('dovrebbe avere timeout false', () => {
expect(state.timeout).toBe(false)
})
})
// =============================================
@@ -479,6 +483,14 @@ describe('Game Logic (gameState.js)', () => {
const s = applyAction(state, { type: 'toggleOrder' })
expect(s.order).toBe(false)
})
it('toggleTimeout: false → true → false', () => {
expect(state.timeout).toBe(false)
const s1 = applyAction(state, { type: 'toggleTimeout' })
expect(s1.timeout).toBe(true)
const s2 = applyAction(s1, { type: 'toggleTimeout' })
expect(s2.timeout).toBe(false)
})
})
// =============================================