Small test fixes.
This commit is contained in:
@@ -1271,5 +1271,22 @@ describe('CameraManager', async () => {
|
||||
middleTime,
|
||||
);
|
||||
});
|
||||
|
||||
it('handles null return value', async () => {
|
||||
const api = createCardAPI();
|
||||
const engine = mock<CameraManagerEngine>();
|
||||
vi.mocked(api.getHASSManager().getHASS).mockReturnValue(createHASS());
|
||||
const manager = createCameraManager(api, engine);
|
||||
|
||||
expect(await manager.initializeCamerasFromConfig()).toBeTruthy();
|
||||
engine.getMediaSeekTime.mockResolvedValue(null);
|
||||
|
||||
const media = new TestViewMedia({
|
||||
cameraID: 'id',
|
||||
startTime: startTime,
|
||||
endTime: endTime,
|
||||
});
|
||||
expect(await manager.getMediaSeekTime(media, middleTime)).toBeNull();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -39,6 +39,7 @@ it('low performance profile', () => {
|
||||
'menu.buttons.timeline.enabled': false,
|
||||
'menu.style': 'outside',
|
||||
'performance.features.animated_progress_indicator': false,
|
||||
'performance.features.max_simultaneous_engine_requests': 1,
|
||||
'performance.features.media_chunk_size': 10,
|
||||
'performance.style.border_radius': false,
|
||||
'performance.style.box_shadow': false,
|
||||
|
||||
Reference in New Issue
Block a user