File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed
Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,8 @@ export async function findForUrl(
3939 // in unit tests on whether 'loadPlugins' was called or not
4040 // - alternatively, we can wrap the 'plugin.default(...)' call in another function
4141 // and make assertions on whether that function was called or not
42+ // - the other option is to wrap each plugin in a class instance
43+ // and make assertions on something like 'plugin.run' being called or not
4244 if ( scansContext . shouldRunPlugins ) {
4345 const plugins = await loadPlugins ( )
4446 for ( const plugin of plugins ) {
@@ -56,7 +58,6 @@ export async function findForUrl(
5658 screenshotId = await generateScreenshots ( page )
5759 }
5860
59- console . log ( 'rawFindings: ' , rawFindings )
6061 findings =
6162 rawFindings ?. violations . map ( violation => ( {
6263 scannerType : 'axe' ,
Original file line number Diff line number Diff line change @@ -10,11 +10,11 @@ let scansContext: ScansContext | undefined
1010export function getScansContext ( ) {
1111 if ( ! scansContext ) {
1212 const scansJson = core . getInput ( 'scans' , { required : false } )
13- console . log ( 'scans input: ' , scansJson )
1413 const scansToPerform = JSON . parse ( scansJson || '{}' )
1514 // - if we dont have a scans input
1615 // or we do have a scans input, but it only has 1 item and its 'axe'
1716 // then we only want to run 'axe' and not the plugins
17+ // - keep in mind, 'onlyAxeScan' is not the same as 'shouldPerformAxeScan'
1818 const onlyAxeScan = scansToPerform . length === 0 || ( scansToPerform . length === 1 && scansToPerform [ 0 ] === 'axe' )
1919
2020 scansContext = {
You can’t perform that action at this time.
0 commit comments