Skip to content

Commit

Permalink
fix the tests
Browse files Browse the repository at this point in the history
  • Loading branch information
MohamedRaslan committed May 26, 2022
1 parent 9cd4c60 commit b490d71
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions cypress/plugins/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,19 @@
const injectCodeCoverage = require('@cypress/code-coverage/task');

// eslint-disable-next-line no-unused-vars
const { lighthouse, prepareAudit } = require('@cypress-audit/lighthouse');
const { pa11y } = require('@cypress-audit/pa11y');
const lighthouseConfig = require('@cypress-audit/lighthouse');
const pa11yConfig = require('@cypress-audit/pa11y');

module.exports = (on, config) => {
// eslint-disable-next-line no-unused-vars
on('before:browser:launch', (browser = {}, launchOptions) => {
prepareAudit(launchOptions);
lighthouseConfig.prepareAudit(launchOptions);
pa11yConfig.prepareAudit(launchOptions);
});

on('task', {
lighthouse: lighthouse(),
pa11y: pa11y((pa11yReport) => {
lighthouse: lighthouseConfig.lighthouse(),
pa11y: pa11yConfig.pa11y((pa11yReport) => {
console.log(pa11yReport); // raw pa11y reports
}),
});
Expand Down

0 comments on commit b490d71

Please sign in to comment.