@@ -52,24 +52,26 @@ export const configureTestSuite = (configureAction?: () => TestBed) => {
5252 } ) ;
5353} ;
5454
55- const myReporter = {
56- suiteStarted : function ( result ) {
57- const id = new URLSearchParams ( window . parent . location . search ) . get ( 'id' ) ;
58- console . log ( `[${ id } ] Suite started: ${ result . fullName } ` ) ;
59-
60- } ,
61-
62- suiteDone : function ( result ) {
63- const id = new URLSearchParams ( window . parent . location . search ) . get ( 'id' ) ;
64- console . log ( `[${ id } ] Suite: ${ result . fullName } has ${ result . status } ` ) ;
65- for ( const expectation of result . failedExpectations ) {
66- console . log ( 'Suite ' + expectation . message ) ;
67- console . log ( expectation . stack ) ;
68- }
69- var memory = ( performance as any ) . memory ;
70- console . log ( `[${ id } ] totalJSHeapSize: ${ memory [ 'totalJSHeapSize' ] } usedJSHeapSize: ${ memory [ 'usedJSHeapSize' ] } jsHeapSizeLimit: ${ memory [ 'jsHeapSizeLimit' ] } ` ) ;
71- if ( memory [ 'totalJSHeapSize' ] >= memory [ 'jsHeapSizeLimit' ] )
72- console . log ( '--------------------Heap Size limit reached!!!-------------------' ) ;
73- } ,
74- } ;
75- jasmine . getEnv ( ) . addReporter ( myReporter ) ;
55+ // should be accessible on re-run by selecting enable debug logging
56+ // https://docs.github.com/en/actions/monitoring-and-troubleshooting-workflows/troubleshooting-workflows/enabling-debug-logging
57+ if ( process . env . ACTIONS_RUNNER_DEBUG ) {
58+ const myReporter = {
59+ suiteStarted : function ( result ) {
60+ const id = new URLSearchParams ( window . parent . location . search ) . get ( 'id' ) ;
61+ console . log ( `[${ id } ] Suite started: ${ result . fullName } ` ) ;
62+ } ,
63+ suiteDone : function ( result ) {
64+ const id = new URLSearchParams ( window . parent . location . search ) . get ( 'id' ) ;
65+ console . log ( `[${ id } ] Suite: ${ result . fullName } has ${ result . status } ` ) ;
66+ for ( const expectation of result . failedExpectations ) {
67+ console . log ( 'Suite ' + expectation . message ) ;
68+ console . log ( expectation . stack ) ;
69+ }
70+ var memory = ( performance as any ) . memory ;
71+ console . log ( `[${ id } ] totalJSHeapSize: ${ memory [ 'totalJSHeapSize' ] } usedJSHeapSize: ${ memory [ 'usedJSHeapSize' ] } jsHeapSizeLimit: ${ memory [ 'jsHeapSizeLimit' ] } ` ) ;
72+ if ( memory [ 'totalJSHeapSize' ] >= memory [ 'jsHeapSizeLimit' ] )
73+ console . log ( '--------------------Heap Size limit reached!!!-------------------' ) ;
74+ } ,
75+ } ;
76+ jasmine . getEnv ( ) . addReporter ( myReporter ) ;
77+ }
0 commit comments