@@ -50,7 +50,7 @@ describe('run-rerun command', function () {
5050 expect ( stdout ) . toContain ( 'Process run 1 of max 3, success runs 1/3' ) ;
5151 expect ( stdout ) . toContain ( 'Process run 2 of max 3, success runs 2/3' ) ;
5252 expect ( stdout ) . toContain ( 'Process run 3 of max 3, success runs 3/3' ) ;
53- expect ( stdout ) . toContain ( ' 1 passed' ) ;
53+ expect ( stdout . match ( / O K \s + \| \s + 1 p a s s e d / g ) ) . toHaveLength ( 3 ) ;
5454 expect ( err ) . toBeNull ( ) ;
5555 } ) ;
5656
@@ -77,7 +77,9 @@ describe('run-rerun command', function () {
7777 const { err, stdout } = await safeExec ( `${ codecept_run_config ( 'codecept.conf.fail_test.js' , '@RunRerun - Fail all attempt' ) } --debug` ) ;
7878
7979 expect ( stdout ) . toContain ( 'Fail run 1 of max 3, success runs 0/2' ) ;
80- expect ( stdout ) . toContain ( 'Process run 3 of max 3, success runs 2/2' ) ;
80+ expect ( stdout ) . toContain ( 'Fail run 2 of max 3, success runs 0/2' ) ;
81+ expect ( stdout ) . toContain ( 'Fail run 3 of max 3, success runs 0/2' ) ;
82+ expect ( stdout ) . toContain ( 'Flaky tests detected!' ) ;
8183 expect ( err . code ) . toBe ( 1 ) ;
8284 } ) ;
8385
@@ -88,7 +90,8 @@ describe('run-rerun command', function () {
8890 ) ;
8991
9092 expect ( stdout ) . toContain ( 'Process run 1 of max 3, success runs 1/2' ) ;
91- expect ( stdout ) . toContain ( 'Process run 2 of max 3, success runs 2/2' ) ;
93+ expect ( stdout ) . toContain ( 'Fail run 2 of max 3, success runs 1/2' ) ;
94+ expect ( stdout ) . toContain ( 'Process run 3 of max 3, success runs 2/2' ) ;
9295 expect ( err ) . toBeNull ( ) ;
9396 } ) ;
9497
@@ -99,6 +102,9 @@ describe('run-rerun command', function () {
99102 ) ;
100103
101104 expect ( stdout ) . toContain ( 'Process run 1 of max 3, success runs 1/3' ) ;
102- expect ( stdout ) . toContain ( 'Process run 3 of max 3, success runs 3/3' ) ;
105+ expect ( stdout ) . toContain ( 'Fail run 2 of max 3, success runs 1/3' ) ;
106+ expect ( stdout ) . toContain ( 'Process run 3 of max 3, success runs 2/3' ) ;
107+ expect ( stdout ) . toContain ( 'Flaky tests detected!' ) ;
108+ expect ( err . code ) . toBe ( 1 ) ;
103109 } ) ;
104110} ) ;
0 commit comments