Function mockToCyIntercept

  • Turn mockData intended for storybook plugin storybook-addon-mock into cypress intercepts. Very likely to be used in a beforeEach. Aliases as the url provided for each mock. Nothing crazy happening here, you could just write cy.intercepts for non-storybook component tests, or nbd to have ones that are redundant of mockData

    Parameters

    • mockData: {
          alias?: string;
          method: string;
          response: unknown;
          status: number;
          url: string;
      }[]

    Returns void