@@ -4,6 +4,10 @@ import * as Rx from 'rxjs';
4
4
import { buffer , map } from 'rxjs/operators' ;
5
5
import spawn from 'spawn-command' ;
6
6
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
+
7
11
const isWindows = process . platform === 'win32' ;
8
12
const createKillMessage = ( prefix : string ) =>
9
13
new RegExp ( _ . escapeRegExp ( prefix ) + ' exited with code ' + ( isWindows ? 1 : '(SIGTERM|143)' ) ) ;
@@ -54,24 +58,17 @@ it('has help command', done => {
54
58
} , done ) ;
55
59
} ) ;
56
60
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
+ } ) ;
75
72
76
73
describe ( 'exiting conditions' , ( ) => {
77
74
it ( 'is of success by default when running successful commands' , done => {
0 commit comments