Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions test/runner/timeout_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ const config_run_config = (config, grep, verbose = false) => `${codecept_run} ${
describe('CodeceptJS Timeouts', function () {
this.timeout(10000)

// some times messages are different
this.retries(2);
// some times messages are different
this.retries(2)

it('should stop test when timeout exceeded', done => {
exec(config_run_config('codecept.conf.js', 'timed out'), (err, stdout) => {
debug_this_test && console.log(stdout)
expect(stdout).toContain('Timeout 2s exceeded')
expect(stdout).toContain('Timeout 1s exceeded')
expect(stdout).toContain('Timeout 2s exceeded (with Before hook)')
expect(stdout).toContain('Timeout 1s exceeded (with Before hook)')
expect(err).toBeTruthy()
done()
})
Expand All @@ -26,8 +26,8 @@ describe('CodeceptJS Timeouts', function () {
exec(`${config_run_config('codecept.conf.js', 'timed out')} --no-timeouts`, (err, stdout) => {
debug_this_test && console.log(stdout)
expect(stdout).toContain('Timeouts were disabled')
expect(stdout).not.toContain('Timeout 2s exceeded')
expect(stdout).not.toContain('Timeout 1s exceeded')
expect(stdout).not.toContain('Timeout 2s exceeded (with Before hook)')
expect(stdout).not.toContain('Timeout 1s exceeded (with Before hook)')
expect(err).toBeFalsy()
done()
})
Expand Down Expand Up @@ -74,7 +74,7 @@ describe('CodeceptJS Timeouts', function () {
it('should override timeout config from global object', done => {
exec(config_run_config('codecept.timeout.obj.conf.js', '#first', false), (err, stdout) => {
debug_this_test && console.log(stdout)
expect(stdout).toContain('Timeout 0.3s exceeded')
expect(stdout).toContain('Timeout 0.3s exceeded (with Before hook)')
expect(err).toBeTruthy()
done()
})
Expand All @@ -83,8 +83,8 @@ describe('CodeceptJS Timeouts', function () {
it('should override timeout config from global object but respect local value', done => {
exec(config_run_config('codecept.timeout.obj.conf.js', '#second'), (err, stdout) => {
debug_this_test && console.log(stdout)
expect(stdout).not.toContain('Timeout 0.3s exceeded')
expect(stdout).toContain('Timeout 0.5s exceeded')
expect(stdout).not.toContain('Timeout 0.3s exceeded (with Before hook)')
expect(stdout).toContain('Timeout 0.5s exceeded (with Before hook)')
expect(err).toBeTruthy()
done()
})
Expand All @@ -93,8 +93,8 @@ describe('CodeceptJS Timeouts', function () {
it('should respect grep when overriding config from global config', done => {
exec(config_run_config('codecept.timeout.obj.conf.js', '#fourth'), (err, stdout) => {
debug_this_test && console.log(stdout)
expect(stdout).not.toContain('Timeout 0.3s exceeded')
expect(stdout).toContain('Timeout 1s exceeded')
expect(stdout).not.toContain('Timeout 0.3s exceeded (with Before hook)')
expect(stdout).toContain('Timeout 1s exceeded (with Before hook)')
expect(err).toBeTruthy()
done()
})
Expand Down