insomnia/packages/insomnia-app/app/__jest__/with-redux-store.tsx

14 lines
419 B
TypeScript
Raw Normal View History

import React from 'react';
import { Provider } from 'react-redux';
import { MockStoreEnhanced } from 'redux-mock-store';
import { RootState } from '../ui/redux/modules';
2021-08-08 05:08:56 +00:00
export const withReduxStore = (store: MockStoreEnhanced<RootState, {}>) =>
class ReduxWrapper extends React.Component {
render() {
const { children } = this.props;
return <Provider store={store}>{children}</Provider>;
}
2021-08-08 05:08:56 +00:00
};