Complete the code to import the Cypress code coverage plugin.
import '[1]';
The correct import path for the Cypress code coverage support file is @cypress/code-coverage/support. This enables code coverage collection during tests.
Complete the code to require the code coverage plugin in the Cypress plugins file.
module.exports = (on, config) => { on('task', require('[1]')(on, config)); return config; };The code coverage plugin is required from @cypress/code-coverage/plugin in the plugins file to enable coverage tasks.
Fix the error in the code to correctly enable code coverage in Cypress plugins.
const codeCoverageTask = require('[1]'); module.exports = (on, config) => { codeCoverageTask(on, config); return config; };
The correct module to require for the code coverage task is @cypress/code-coverage/plugin. Using 'support' or missing '@' causes errors.
Fill both blanks to configure Cypress to collect coverage and save reports.
module.exports = (on, config) => { on('[1]', require('@cypress/code-coverage/plugin')(on, config)); return [2]; };The event name to listen for is task, and the Cypress config object must be returned as config.
Fill all three blanks to add code coverage support import and configure plugin in Cypress.
import '[1]'; module.exports = (on, [2]) => { on('[3]', require('@cypress/code-coverage/plugin')(on, [2])); return [2]; };
The support file is imported from @cypress/code-coverage/support. The plugin function uses the task event and the config object is passed and returned.