File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2121const 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
2727module . 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 } ) ;
You can’t perform that action at this time.
0 commit comments