Skip to content

Commit a26679f

Browse files
author
DavertMik
committed
fixed timeout tests
1 parent 4810867 commit a26679f

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

test/runner/step-enhancements_test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ describe('CodeceptJS step-enhancements', function () {
2626
debug(stdout)
2727
expect(err).toBeTruthy()
2828
expect(stdout).not.toContain('OK')
29-
expect(stdout).toContain('was interrupted on step timeout 100ms')
29+
expect(stdout).toContain('was interrupted on timeout 100ms')
3030
done()
3131
})
3232
})

test/runner/step_timeout_test.js

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

1212
it('should stop test, when step timeout exceeded', done => {
1313
exec(config_run_config('codecept-1000.conf.js', 'Default command timeout'), (err, stdout) => {
14-
expect(stdout).toContain('Action exceededByTimeout: 1500 was interrupted on step timeout 1000ms')
14+
expect(stdout).toContain('Action exceededByTimeout: 1500 was interrupted on timeout 1000ms')
1515
expect(stdout).toContain('0 passed, 1 failed')
1616
expect(stdout).toContain(figures.cross + ' I.exceededByTimeout(1500)')
1717
expect(err).toBeTruthy()
@@ -21,7 +21,7 @@ describe('CodeceptJS Steps', function () {
2121

2222
it('should respect custom timeout with regex', done => {
2323
exec(config_run_config('codecept-1000.conf.js', 'Wait with longer timeout', debug_this_test), (err, stdout) => {
24-
expect(stdout).not.toContain('was interrupted on step timeout')
24+
expect(stdout).not.toContain('was interrupted on timeout')
2525
expect(stdout).toContain('1 passed')
2626
expect(err).toBeFalsy()
2727
done()
@@ -30,7 +30,7 @@ describe('CodeceptJS Steps', function () {
3030

3131
it('should respect custom timeout with full step name', done => {
3232
exec(config_run_config('codecept-1000.conf.js', 'Wait with shorter timeout', debug_this_test), (err, stdout) => {
33-
expect(stdout).toContain('Action waitTadShorter: 750 was interrupted on step timeout 500ms')
33+
expect(stdout).toContain('Action waitTadShorter: 750 was interrupted on timeout 500ms')
3434
expect(stdout).toContain('0 passed, 1 failed')
3535
expect(err).toBeTruthy()
3636
done()
@@ -39,7 +39,7 @@ describe('CodeceptJS Steps', function () {
3939

4040
it('should not stop test, when step not exceeded', done => {
4141
exec(config_run_config('codecept-2000.conf.js', 'Default command timeout'), (err, stdout) => {
42-
expect(stdout).not.toContain('was interrupted on step timeout')
42+
expect(stdout).not.toContain('was interrupted on timeout')
4343
expect(stdout).toContain('1 passed')
4444
expect(err).toBeFalsy()
4545
done()
@@ -48,7 +48,7 @@ describe('CodeceptJS Steps', function () {
4848

4949
it('should ignore timeout for steps with `wait*` prefix', done => {
5050
exec(config_run_config('codecept-1000.conf.js', 'Wait command timeout'), (err, stdout) => {
51-
expect(stdout).not.toContain('was interrupted on step timeout')
51+
expect(stdout).not.toContain('was interrupted on timeout')
5252
expect(stdout).toContain('1 passed')
5353
expect(err).toBeFalsy()
5454
done()
@@ -57,7 +57,7 @@ describe('CodeceptJS Steps', function () {
5757

5858
it('step timeout should work nicely with step retries', done => {
5959
exec(config_run_config('codecept-1000.conf.js', 'Rerun sleep'), (err, stdout) => {
60-
expect(stdout).not.toContain('was interrupted on step timeout')
60+
expect(stdout).not.toContain('was interrupted on timeout')
6161
expect(stdout).toContain('1 passed')
6262
expect(err).toBeFalsy()
6363
done()

0 commit comments

Comments
 (0)