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:
@@ -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)
|
||||
})
|
||||
})
|
||||
|
||||
// =============================================
|
||||
|
||||
Reference in New Issue
Block a user