@@ -9,14 +9,14 @@ const config_run_config = (config, grep, verbose = false) => `${codecept_run} ${
99describe ( 'CodeceptJS Timeouts' , function ( ) {
1010 this . timeout ( 10000 )
1111
12- // some times messages are different
13- this . retries ( 2 ) ;
12+ // some times messages are different
13+ this . retries ( 2 )
1414
1515 it ( 'should stop test when timeout exceeded' , done => {
1616 exec ( config_run_config ( 'codecept.conf.js' , 'timed out' ) , ( err , stdout ) => {
1717 debug_this_test && console . log ( stdout )
18- expect ( stdout ) . toContain ( 'Timeout 2s exceeded' )
19- expect ( stdout ) . toContain ( 'Timeout 1s exceeded' )
18+ expect ( stdout ) . toContain ( 'Timeout 2s exceeded (with Before hook) ' )
19+ expect ( stdout ) . toContain ( 'Timeout 1s exceeded (with Before hook) ' )
2020 expect ( err ) . toBeTruthy ( )
2121 done ( )
2222 } )
@@ -26,8 +26,8 @@ describe('CodeceptJS Timeouts', function () {
2626 exec ( `${ config_run_config ( 'codecept.conf.js' , 'timed out' ) } --no-timeouts` , ( err , stdout ) => {
2727 debug_this_test && console . log ( stdout )
2828 expect ( stdout ) . toContain ( 'Timeouts were disabled' )
29- expect ( stdout ) . not . toContain ( 'Timeout 2s exceeded' )
30- expect ( stdout ) . not . toContain ( 'Timeout 1s exceeded' )
29+ expect ( stdout ) . not . toContain ( 'Timeout 2s exceeded (with Before hook) ' )
30+ expect ( stdout ) . not . toContain ( 'Timeout 1s exceeded (with Before hook) ' )
3131 expect ( err ) . toBeFalsy ( )
3232 done ( )
3333 } )
@@ -74,7 +74,7 @@ describe('CodeceptJS Timeouts', function () {
7474 it ( 'should override timeout config from global object' , done => {
7575 exec ( config_run_config ( 'codecept.timeout.obj.conf.js' , '#first' , false ) , ( err , stdout ) => {
7676 debug_this_test && console . log ( stdout )
77- expect ( stdout ) . toContain ( 'Timeout 0.3s exceeded' )
77+ expect ( stdout ) . toContain ( 'Timeout 0.3s exceeded (with Before hook) ' )
7878 expect ( err ) . toBeTruthy ( )
7979 done ( )
8080 } )
@@ -83,8 +83,8 @@ describe('CodeceptJS Timeouts', function () {
8383 it ( 'should override timeout config from global object but respect local value' , done => {
8484 exec ( config_run_config ( 'codecept.timeout.obj.conf.js' , '#second' ) , ( err , stdout ) => {
8585 debug_this_test && console . log ( stdout )
86- expect ( stdout ) . not . toContain ( 'Timeout 0.3s exceeded' )
87- expect ( stdout ) . toContain ( 'Timeout 0.5s exceeded' )
86+ expect ( stdout ) . not . toContain ( 'Timeout 0.3s exceeded (with Before hook) ' )
87+ expect ( stdout ) . toContain ( 'Timeout 0.5s exceeded (with Before hook) ' )
8888 expect ( err ) . toBeTruthy ( )
8989 done ( )
9090 } )
@@ -93,8 +93,8 @@ describe('CodeceptJS Timeouts', function () {
9393 it ( 'should respect grep when overriding config from global config' , done => {
9494 exec ( config_run_config ( 'codecept.timeout.obj.conf.js' , '#fourth' ) , ( err , stdout ) => {
9595 debug_this_test && console . log ( stdout )
96- expect ( stdout ) . not . toContain ( 'Timeout 0.3s exceeded' )
97- expect ( stdout ) . toContain ( 'Timeout 1s exceeded' )
96+ expect ( stdout ) . not . toContain ( 'Timeout 0.3s exceeded (with Before hook) ' )
97+ expect ( stdout ) . toContain ( 'Timeout 1s exceeded (with Before hook) ' )
9898 expect ( err ) . toBeTruthy ( )
9999 done ( )
100100 } )
0 commit comments