File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,8 @@ const config = {
88 slowMo : parseInt ( process . env . SLOW_MO ) || 0 ,
99 timeout : parseInt ( process . env . TIMEOUT ) || 60 ,
1010 minTimeout : parseInt ( process . env . MIN_TIMEOUT ) || 5 ,
11- headless : process . env . HEADLESS === 'true'
11+ headless : process . env . HEADLESS === 'true' ,
12+ debug : process . env . DEBUG === 'true'
1213}
1314
1415module . exports = config
Original file line number Diff line number Diff line change @@ -23,6 +23,9 @@ AfterAll(async function () {
2323Before ( async function ( ) {
2424 global . context = await global . browser . newContext ( { ignoreHTTPSErrors : true } )
2525 global . page = await global . context . newPage ( )
26+ if ( config . debug ) {
27+ global . page . on ( 'console' , ( msg ) => console . log ( msg . text ( ) ) )
28+ }
2629} )
2730
2831// Cleanup after each scenario
You can’t perform that action at this time.
0 commit comments