Optimise Jest run in CI (#9542)

This commit is contained in:
Michael Telatynski
2022-11-04 10:48:08 +00:00
committed by GitHub
parent 28ecdc0cb4
commit 04bc8fb71c
55 changed files with 1388 additions and 1305 deletions
@@ -97,6 +97,7 @@ describe('<LeftPanelLiveShareWarning />', () => {
});
beforeEach(() => {
// @ts-ignore writing to readonly variable
mocked(OwnBeaconStore.instance).isMonitoringLiveLocation = true;
mocked(OwnBeaconStore.instance).getLiveBeaconIdsWithLocationPublishError.mockReturnValue([]);
mocked(OwnBeaconStore.instance).getLiveBeaconIds.mockReturnValue([beacon2.identifier, beacon1.identifier]);
@@ -190,6 +191,7 @@ describe('<LeftPanelLiveShareWarning />', () => {
expect(container.innerHTML).toBeTruthy();
act(() => {
// @ts-ignore writing to readonly variable
mocked(OwnBeaconStore.instance).isMonitoringLiveLocation = false;
OwnBeaconStore.instance.emit(OwnBeaconStoreEvent.MonitoringLivePosition);
});