Skip to content

Commit 3e25f76

Browse files
committed
fix: Update test references to use .cjs config files
Updated runner test files to reference .cjs config files: - timeout_test.js: Updated all timeout config references - only_test.js: Updated config reference - html-reporter-plugin_test.js: Already updated in previous commit
1 parent bcb1f38 commit 3e25f76

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

test/runner/only_test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const assert = require('assert')
44

55
const runner = path.join(__dirname, '/../../bin/codecept.js')
66
const codecept_dir = path.join(__dirname, '/../data/sandbox/configs/only')
7-
const codecept_run = `${runner} run --config ${codecept_dir}/codecept.conf.js `
7+
const codecept_run = `${runner} run --config ${codecept_dir}/codecept.conf.cjs `
88

99
describe('Feature.only', () => {
1010
it('should run only scenarios in Feature.only and skip other features', done => {

test/runner/timeout_test.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ describe('CodeceptJS Timeouts', function () {
5252

5353
it('should use global timeouts if timeout is set', done => {
5454
this.retries(3)
55-
exec(config_run_config('codecept.timeout.conf.js', 'no timeout test'), (err, stdout) => {
55+
exec(config_run_config('codecept.timeout.conf.cjs', 'no timeout test'), (err, stdout) => {
5656
debug_this_test && console.log(stdout)
5757
expect(stdout).toContain('Timeout 0.1')
5858
expect(err).toBeTruthy()
@@ -70,7 +70,7 @@ describe('CodeceptJS Timeouts', function () {
7070
})
7171

7272
it('should keep timeout with steps', done => {
73-
exec(config_run_config('codecept.timeout.conf.js', 'timeout step', true), (err, stdout) => {
73+
exec(config_run_config('codecept.timeout.conf.cjs', 'timeout step', true), (err, stdout) => {
7474
debug_this_test && console.log(stdout)
7575
expect(stdout).toContain('was interrupted on timeout 100ms')
7676
expect(err).toBeTruthy()
@@ -79,7 +79,7 @@ describe('CodeceptJS Timeouts', function () {
7979
})
8080

8181
it('should override timeout config from global object', done => {
82-
exec(config_run_config('codecept.timeout.obj.conf.js', '#first', false), (err, stdout) => {
82+
exec(config_run_config('codecept.timeout.obj.conf.cjs', '#first', false), (err, stdout) => {
8383
debug_this_test && console.log(stdout)
8484
expect(stdout).toContain('Timeout 0.3s exceeded (with Before hook)')
8585
expect(err).toBeTruthy()
@@ -88,7 +88,7 @@ describe('CodeceptJS Timeouts', function () {
8888
})
8989

9090
it('should override timeout config from global object but respect local value', done => {
91-
exec(config_run_config('codecept.timeout.obj.conf.js', '#second'), (err, stdout) => {
91+
exec(config_run_config('codecept.timeout.obj.conf.cjs', '#second'), (err, stdout) => {
9292
debug_this_test && console.log(stdout)
9393
expect(stdout).not.toContain('Timeout 0.3s exceeded (with Before hook)')
9494
expect(stdout).toContain('Timeout 0.5s exceeded (with Before hook)')
@@ -98,7 +98,7 @@ describe('CodeceptJS Timeouts', function () {
9898
})
9999

100100
it('should respect grep when overriding config from global config', done => {
101-
exec(config_run_config('codecept.timeout.obj.conf.js', '#fourth'), (err, stdout) => {
101+
exec(config_run_config('codecept.timeout.obj.conf.cjs', '#fourth'), (err, stdout) => {
102102
debug_this_test && console.log(stdout)
103103
expect(stdout).not.toContain('Timeout 0.3s exceeded (with Before hook)')
104104
expect(stdout).toContain('Timeout 1s exceeded (with Before hook)')
@@ -108,7 +108,7 @@ describe('CodeceptJS Timeouts', function () {
108108
})
109109

110110
it('should enforce global timeout even with BeforeSuite', done => {
111-
exec(config_run_config('codecept.beforeSuiteTimeout.conf.js', 'enforce global timeout with BeforeSuite', true), (err, stdout) => {
111+
exec(config_run_config('codecept.beforeSuiteTimeout.conf.cjs', 'enforce global timeout with BeforeSuite', true), (err, stdout) => {
112112
debug_this_test && console.log(stdout)
113113
expect(stdout).toContain('Timeout 2s exceeded')
114114
expect(stdout).toContain('TestTimeoutError')

0 commit comments

Comments
 (0)