Skip to content

Commit 2003418

Browse files
committed
fix: flaky timeout test
1 parent 7d298cf commit 2003418

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/runner/timeout_test.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ describe('CodeceptJS Timeouts', function () {
1616
exec(config_run_config('codecept.conf.js', 'timed out'), (err, stdout) => {
1717
debug_this_test && console.log(stdout)
1818
expect(stdout).toContain('Timeout 2s exceeded (with Before hook)')
19-
expect(stdout).toContain('Timeout 1s exceeded (with Before hook)')
19+
// The second scenario can show either format depending on which timeout triggers first
20+
expect(stdout.includes('Timeout 1s exceeded (with Before hook)') || stdout.includes('timed out after 1s')).toBeTruthy()
2021
expect(err).toBeTruthy()
2122
done()
2223
})

0 commit comments

Comments
 (0)