fix: Fix issue with media view incorrectly rejecting cameras (#2061)

For issue: #1748
This commit is contained in:
Dermot Duffy
2025-05-23 20:02:13 -07:00
committed by GitHub
parent 14cf80c7b4
commit b97e1358d0
7 changed files with 21 additions and 24 deletions
+2 -2
View File
@@ -20,7 +20,7 @@ describe('getViewDefault', () => {
expect(factory.getViewDefault()).toBeNull();
});
it('should return null if no cameras support view', () => {
it('should throw if no cameras support view', () => {
const api = createCardAPI();
vi.mocked(api.getConfigManager().getConfig).mockReturnValue(createConfig());
vi.mocked(api.getCameraManager).mockReturnValue(createCameraManager());
@@ -44,7 +44,7 @@ describe('getViewDefault', () => {
);
const factory = new ViewFactory(api);
expect(factory.getViewDefault()).toBeNull();
expect(() => factory.getViewDefault()).toThrowError(/No cameras support this view/);
});
it('should create view', () => {