test: Split test utilities to improve test times (#2622)

This commit is contained in:
Dermot Duffy
2026-07-26 16:29:53 -07:00
committed by GitHub
parent 8d44fcecf1
commit ad89aa9538
234 changed files with 2730 additions and 2516 deletions
+8 -9
View File
@@ -13,12 +13,11 @@ import { View } from '../../../src/view/view';
import {
createCameraManager,
createCapabilities,
createCardAPI,
createConfig,
createFolder,
createStore,
createView,
} from '../../test-utils';
} from '../../camera-manager/test-utils';
import { createConfig } from '../../config/test-utils';
import { createCardAPI, createFolder } from '../../test-utils';
import { createView } from '../../view/test-utils';
import { createPopulatedAPI } from './test-utils';
describe('getViewDefault', () => {
@@ -51,7 +50,7 @@ describe('getViewDefault', () => {
);
const factory = new ViewFactory(api);
expect(() => factory.getViewDefault()).toThrowError(ViewIncompatible);
expect(() => factory.getViewDefault()).toThrow(ViewIncompatible);
});
it('should use folders view as default when folders exist without cameras', () => {
@@ -245,7 +244,7 @@ describe('getViewByParameters', () => {
view: 'snapshots',
},
}),
).toThrowError(ViewIncompatible);
).toThrow(ViewIncompatible);
});
describe('should handle no camera for view with failsafe', () => {
@@ -325,7 +324,7 @@ describe('getViewByParameters', () => {
view: 'snapshots',
},
}),
).toThrowError(ViewIncompatible);
).toThrow(ViewIncompatible);
});
it('should choose live view with failsafe', () => {
@@ -373,7 +372,7 @@ describe('getViewByParameters', () => {
view: 'snapshots',
},
}),
).toThrowError(ViewIncompatible);
).toThrow(ViewIncompatible);
});
});