Skip to content

Commit 0980e5b

Browse files
authoredJun 21, 2022
Fix timeout issue when testing on macOS / Windows in CI (#333)
1 parent 29b18f8 commit 0980e5b

File tree

1 file changed

+15
-18
lines changed

1 file changed

+15
-18
lines changed
 

‎bin/concurrently.spec.ts

+15-18
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ import * as Rx from 'rxjs';
44
import { buffer, map } from 'rxjs/operators';
55
import spawn from 'spawn-command';
66

7+
// Increasing timeout for these tests as sometimes it exceeded
8+
// in the CI when running on macOS / Windows (default is 5000ms)
9+
jest.setTimeout(10000);
10+
711
const isWindows = process.platform === 'win32';
812
const createKillMessage = (prefix: string) =>
913
new RegExp(_.escapeRegExp(prefix) + ' exited with code ' + (isWindows ? 1 : '(SIGTERM|143)'));
@@ -54,24 +58,17 @@ it('has help command', done => {
5458
}, done);
5559
});
5660

57-
// Increasing timeout for this test as it is sometimes exceeded
58-
// in the CI when running on macOS (default is 5000ms)
59-
const increasedTimeout = 10000;
60-
it(
61-
'has version command',
62-
done => {
63-
Rx.combineLatest([run('--version').close, run('-V').close, run('-v').close]).subscribe(
64-
events => {
65-
expect(events[0][0]).toBe(0);
66-
expect(events[1][0]).toBe(0);
67-
expect(events[2][0]).toBe(0);
68-
done();
69-
},
70-
done
71-
);
72-
},
73-
increasedTimeout
74-
);
61+
it('has version command', done => {
62+
Rx.combineLatest([run('--version').close, run('-V').close, run('-v').close]).subscribe(
63+
events => {
64+
expect(events[0][0]).toBe(0);
65+
expect(events[1][0]).toBe(0);
66+
expect(events[2][0]).toBe(0);
67+
done();
68+
},
69+
done
70+
);
71+
});
7572

7673
describe('exiting conditions', () => {
7774
it('is of success by default when running successful commands', done => {

0 commit comments

Comments
 (0)
Please sign in to comment.