Function mountTest

  • Execute all tests as part of one large cypress describe block. Put it into a file like mount.cy.ts with

    import { mountTest } from "./test";

    // if the full file needs to be skipped for some reason, instead of just
    // putting `cySkip: true` on the default export for that file. E.g. if
    // the file uses webpack plugins that you don't want to bother with
    const skipFiles = [
    "src/common/components/SomeComponent/index.stories.tsx",
    "src/app/other/component/index.stories.tsx",
    ];
    mountTest(skipFiles);

    Parameters

    • Optional skipFiles: string[]

      Any *.stories.tsx files with their full paths from root dir through to filetype suffix

    • requireFileCallback: RequireFileCallback = require

      Transform the full file path into the imported module. This can be tricky b/c webpack needs some manual text to hook in properly. See RequireFileCallback

    • description: string = "mount all storybook files"

      Text passed to cypress's describe block

    Returns void