DEV Community

loading...

Discussion on: Code Coverage With Cypress & Angular

Collapse
valio2 profile image
valio2

Since cypress version 4.4, plugins/indexjs file should look like this:

const cypressTypeScriptPreprocessor = require("./cy-ts-preprocessor");
const registerCodeCoverageTasks = require('@cypress/code-coverage/task');

module.exports = (on, config) => {
on('file:preprocessor', cypressTypeScriptPreprocessor);

// enable code coverage collection
return registerCodeCoverageTasks(on, config);
}