Open Rahul-Todupunoori opened 9 months ago
We are trying to use cypress-audit/lighthouse, and we are trying to setup HTML reports for the lighthouse and see ts compilation errors for the lighthouseReport for invalid arguments.
lighthouseReport
cypress.config.ts
on('task', { lighthouse: lighthouse((lighthouseReport) => { writeFile('lighthouse.html', lighthouseReport.report, (error: any) => { error ? console.log(error) : console.log('Report created successfully'); }); }), }); on('before:browser:launch', (_browser, launchOptions) => { prepareAudit(launchOptions); });
test code
cy.lighthouse( { performance: 20, accessibility: 100, 'best-practices': 85, seo: 85, pwa: 100, }, { disableStorageReset: false }, { settings: { output: 'html' }, extends: 'lighthouse:default', } );
Error message:
We are trying to use cypress-audit/lighthouse, and we are trying to setup HTML reports for the lighthouse and see ts compilation errors for the
lighthouseReport
for invalid arguments.cypress.config.ts
test code
Error message: