Type alias CyTestConfig

CyTestConfig: {
    format?: {
        cyTest?: boolean;
        function?: boolean;
        object?: boolean;
    };
    storyLocation?: string;
}

Configure the cypress storybook test runner. You can put this in config object e.g.

// in cypress.config.ts
export defineConfig({
// ... other config
component: {
env: {
"orphic-cypress": {
format: {
cyTest: false,
object: false,
function: true,
},
storyLocation: "./somewhere/",
}
}
}
});

or similarly in setupNodeEvents via config.env.cyTest.format.object = false etc.

Provide format.cyTest to disable adding .cyTest format tests to stories, format.object to disable .cy = {"should x", () => ...}, format.function to disable .cy = () => .... If false is provided for all three, then tests must be kept in external files.

Default is true for all values.

Type declaration

  • Optional format?: {
        cyTest?: boolean;
        function?: boolean;
        object?: boolean;
    }

    top level key for opting out of file formats

    • Optional cyTest?: boolean

      disable .cyTest format

    • Optional function?: boolean

      disable .cy function format

    • Optional object?: boolean

      disable .cy object format

  • Optional storyLocation?: string

    optional to inform mount/require style tests that the root directory where stories can be found is not ./src/ which is the default. This lib for instance, sets it as ./stories/