text: import checkPropTypes from "check-prop-types";
  import { createStore, applyMiddleware } from "redux";
  
  import rootReducer from "../redux/reducers";
  import { middlewares } from "../configureStore";
  
  export const storeFactory = (initialState) => {
    const createStoreWithMiddleware = applyMiddleware(...middlewares)(
      createStore
    );
    return createStoreWithMiddleware(rootReducer, initialState);
  };
  
  export const findByTestAttributes = (wrapper, value) => {
    return wrapper.find(`[data-test="${value}"]`);
  };
  
  export const checkProps = (component, conformingProps) => {
    const propError = checkPropTypes(
      component.propTypes,
      conformingProps,
      "prop",
      component.name
    );
    expect(propError).toBeUndefined();
  };
  