mirror of
https://github.com/sky-systems/sky_phone.git
synced 2026-09-04 17:23:25 +00:00
ENH - paginate Gallery in batches of 30
This commit is contained in:
@@ -3,6 +3,7 @@ import { describe, expect, it } from 'vitest'
|
||||
import {
|
||||
filterMedia,
|
||||
formatRecordingDuration,
|
||||
hasNextMediaPage,
|
||||
mediaErrorKey,
|
||||
mergeMedia,
|
||||
} from './media'
|
||||
@@ -32,6 +33,12 @@ describe('media utilities', () => {
|
||||
])
|
||||
})
|
||||
|
||||
it('loads another gallery page only after a full 30-item batch', () => {
|
||||
expect(hasNextMediaPage(30)).toBe(true)
|
||||
expect(hasNextMediaPage(29)).toBe(false)
|
||||
expect(hasNextMediaPage(0)).toBe(false)
|
||||
})
|
||||
|
||||
it('formats unlimited recording durations', () => {
|
||||
expect(formatRecordingDuration(0)).toBe('00:00')
|
||||
expect(formatRecordingDuration(3_725_000)).toBe('62:05')
|
||||
|
||||
Reference in New Issue
Block a user