mirror of
https://github.com/Kong/insomnia
synced 2024-11-08 14:49:53 +00:00
19 lines
689 B
TypeScript
19 lines
689 B
TypeScript
import { ACTIVITY_DEBUG } from '../common/constants';
|
|
import { BASE_SPACE_ID } from '../models/space';
|
|
import { RootState } from '../ui/redux/modules';
|
|
import * as entities from '../ui/redux/modules/entities';
|
|
import { GlobalState } from '../ui/redux/modules/global';
|
|
|
|
export const reduxStateForTest = async (global: Partial<GlobalState> = {}): Promise<RootState> => ({
|
|
entities: entities.reducer(entities.initialEntitiesState, entities.initializeWith(await entities.allDocs())),
|
|
global: {
|
|
activeWorkspaceId: null,
|
|
activeActivity: ACTIVITY_DEBUG,
|
|
activeSpaceId: BASE_SPACE_ID,
|
|
isLoading: false,
|
|
isLoggedIn: false,
|
|
loadingRequestIds: {},
|
|
...global,
|
|
},
|
|
});
|