Skip to content

Commit b2dfe68

Browse files
committed
fix: update timeout tests to reference .cjs config files
- Changed codecept.conf.js references to codecept.conf.cjs - Aligns with ESM migration where CommonJS configs must use .cjs extension
1 parent ba977ef commit b2dfe68

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/runner/timeout_test.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ describe('CodeceptJS Timeouts', function () {
1919
this.retries(2)
2020

2121
it('should stop test when timeout exceeded', done => {
22-
exec(config_run_config('codecept.conf.js', 'timed out'), (err, stdout) => {
22+
exec(config_run_config('codecept.conf.cjs', 'timed out'), (err, stdout) => {
2323
debug_this_test && console.log(stdout)
2424
expect(stdout).toContain('Timeout 2s exceeded (with Before hook)')
2525
// The second scenario can show either format depending on which timeout triggers first
@@ -30,7 +30,7 @@ describe('CodeceptJS Timeouts', function () {
3030
})
3131

3232
it('should take --no-timeouts option', done => {
33-
exec(`${config_run_config('codecept.conf.js', 'timed out')} --no-timeouts`, (err, stdout) => {
33+
exec(`${config_run_config('codecept.conf.cjs', 'timed out')} --no-timeouts`, (err, stdout) => {
3434
debug_this_test && console.log(stdout)
3535
expect(stdout).toContain('Timeouts were disabled')
3636
expect(stdout).not.toContain('Timeout 2s exceeded (with Before hook)')
@@ -41,7 +41,7 @@ describe('CodeceptJS Timeouts', function () {
4141
})
4242

4343
it('should ignore timeouts if no timeout', done => {
44-
exec(config_run_config('codecept.conf.js', 'no timeout test'), (err, stdout) => {
44+
exec(config_run_config('codecept.conf.cjs', 'no timeout test'), (err, stdout) => {
4545
debug_this_test && console.log(stdout)
4646
expect(stdout).not.toContain('TimeoutError')
4747
expect(stdout).not.toContain('was interrupted on')
@@ -61,7 +61,7 @@ describe('CodeceptJS Timeouts', function () {
6161
})
6262

6363
it('should prefer step timeout', done => {
64-
exec(config_run_config('codecept.conf.js', 'timeout step', true), (err, stdout) => {
64+
exec(config_run_config('codecept.conf.cjs', 'timeout step', true), (err, stdout) => {
6565
debug_this_test && console.log(stdout)
6666
expect(stdout).toContain('was interrupted on timeout 200ms')
6767
expect(err).toBeTruthy()

0 commit comments

Comments
 (0)