insomnia/packages/insomnia-app/app/__jest__/redux-state-for-test.ts
Dimitri Mitropoulos 5f4c19da35
[TypeScript] Phase 1 & 2 (#3370)
Co-authored-by: Opender Singh <opender.singh@konghq.com>
2021-05-12 18:35:00 +12:00

11 lines
319 B
TypeScript

import * as entities from '../ui/redux/modules/entities';
const reduxStateForTest = async (activeWorkspaceId: string): Promise<Record<string, any>> => ({
entities: entities.reducer({}, entities.initializeWith(await entities.allDocs())),
global: {
activeWorkspaceId,
},
});
export default reduxStateForTest;