test: Split test utilities to improve test times (#2622)
This commit is contained in:
@@ -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);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user