Skip to content

Commit b490d71

Browse files
committed
fix the tests
1 parent 9cd4c60 commit b490d71

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

cypress/plugins/index.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,19 @@
2121
const injectCodeCoverage = require('@cypress/code-coverage/task');
2222

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

2727
module.exports = (on, config) => {
2828
// eslint-disable-next-line no-unused-vars
2929
on('before:browser:launch', (browser = {}, launchOptions) => {
30-
prepareAudit(launchOptions);
30+
lighthouseConfig.prepareAudit(launchOptions);
31+
pa11yConfig.prepareAudit(launchOptions);
3132
});
3233

3334
on('task', {
34-
lighthouse: lighthouse(),
35-
pa11y: pa11y((pa11yReport) => {
35+
lighthouse: lighthouseConfig.lighthouse(),
36+
pa11y: pa11yConfig.pa11y((pa11yReport) => {
3637
console.log(pa11yReport); // raw pa11y reports
3738
}),
3839
});

0 commit comments

Comments
 (0)