Skip to content

How do you keep the coverage tasks registered when using multiple config files? #563

Closed
@gwvt

Description

@gwvt

How do you keep the coverage tasks registered when using multiple config files as documented at https://docs.cypress.io/api/plugins/configuration-api#Customize-available-browsers?

In plugins/index.js as documented there:

module.exports = (on, config) => {
  const environment = config.env.configFile || "development";
  const configurationForEnvironment = fetchConfigurationByFile(environment);

  return configurationForEnvironment || config;
};

How do you incorporate

  require('@cypress/code-coverage/task')(on, config);

to register the coverage tasks on the returned config object? Config by file works but without coverage. Coverage works without config by file (i.e., just returning config). I can't get both to work together...

Originally posted by @gwvt in #179 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions