-
Notifications
You must be signed in to change notification settings - Fork 111
Support should not send coverage unless plugins task has been registered #179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Maybe if plugins can set a variable when registering a task we could do // user code
module.exports = (on, config) => {
require('@cypress/code-coverage/task')(on, config)
} inside the task module.exports = (on, config) => {
on('task', tasks)
config.env.codeCoverageTasksRegistered = true
return config
} |
🎉 This issue has been resolved in version 3.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
For those who run into the edge case of trying to add TLDR: require('@cypress/code-coverage/task')(on, config)
config.env = {
...process.env,
...config.env, // Don't overwrite `codeCoverageTasksRegistered` set by `@cypress/code-coverage/task`
}; |
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
How do you incorporate
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 |
in a situation where a support file has been registered BUT there is no task in the plugins file, we should not try to call the coverage report task
Example situation
The text was updated successfully, but these errors were encountered: