diff --git a/generators/cypress/templates/src/test/javascript/cypress/plugins/index.ts.ejs b/generators/cypress/templates/src/test/javascript/cypress/plugins/index.ts.ejs index 7343168ce4b..c417f1c8f37 100644 --- a/generators/cypress/templates/src/test/javascript/cypress/plugins/index.ts.ejs +++ b/generators/cypress/templates/src/test/javascript/cypress/plugins/index.ts.ejs @@ -28,15 +28,15 @@ // This function is called when a project is opened or re-opened (e.g. due to // the project's config changing) -import fs = require('fs');; +import fs = require('fs'); import { lighthouse, pa11y, prepareAudit } from 'cypress-audit'; import ReportGenerator = require('lighthouse/report/generator/report-generator'); /** * @type {Cypress.PluginConfig} */ -module.exports = (on, config) => { +module.exports = (on<%_ if (cypressCoverage) { _%>, config<%_ } _%>) => { // `on` is used to hook into various events Cypress emits - // `config` is the resolved Cypress config + <%_ if (cypressCoverage) { _%>// `config` is the resolved Cypress config<%_ } _%> on('before:browser:launch', (browser, launchOptions) => { prepareAudit(launchOptions); if (browser.name === 'chrome' && browser.isHeadless) {