How to use the @commercetools-frontend/sdk/test-utils.createTestMiddleware function in @commercetools-frontend/sdk

To help you get started, we’ve selected a few @commercetools-frontend/sdk examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github commercetools / merchant-center-application-kit / packages / application-shell / src / test-utils / test-utils.js View on Github external
const reduxStore = (() => {
    if (store) return store;

    if (sdkMocks.length === 0) return createReduxStore(storeState);

    const testingMiddleware = createSdkTestMiddleware(sdkMocks);
    return createReduxStore(storeState, [testingMiddleware]);
  })();