File tree 3 files changed +12
-10
lines changed
3 files changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -282,10 +282,10 @@ const buildTestPathPattern = (argv: Argv): string => {
282
282
const patterns = [ ] ;
283
283
284
284
if ( argv . _ ) {
285
- patterns . push ( ... argv . _ ) ;
285
+ patterns . push . apply ( patterns , argv . _ ) ;
286
286
}
287
287
if ( argv . testPathPattern ) {
288
- patterns . push ( ... argv . testPathPattern ) ;
288
+ patterns . push . apply ( patterns , argv . testPathPattern ) ;
289
289
}
290
290
291
291
const testPathPattern = patterns . map ( replacePathSepForRegex ) . join ( '|' ) ;
Original file line number Diff line number Diff line change @@ -99,10 +99,10 @@ export default class Runner extends EventEmitter {
99
99
100
100
runJestWithUpdateForSnapshots ( completion : any , args : string [ ] ) {
101
101
const defaultArgs = [ '--updateSnapshot' ] ;
102
- const updateProcess = this . _createProcess ( this . workspace , [
103
- ... defaultArgs ,
104
- ... ( args ? args : [ ] ) ,
105
- ] ) ;
102
+ const updateProcess = this . _createProcess (
103
+ this . workspace ,
104
+ [ ] . concat ( defaultArgs ) . concat ( args ? args : [ ] ) ,
105
+ ) ;
106
106
updateProcess . on ( 'close' , ( ) => {
107
107
completion ( ) ;
108
108
} ) ;
Original file line number Diff line number Diff line change @@ -119,13 +119,15 @@ class Resolver {
119
119
const defaultPlatform = this . _options . defaultPlatform ;
120
120
const extensions = this . _options . extensions . slice ( ) ;
121
121
if ( this . _supportsNativePlatform ( ) ) {
122
- extensions . unshift (
123
- ...this . _options . extensions . map ( ext => '.' + NATIVE_PLATFORM + ext ) ,
122
+ extensions . unshift . apply (
123
+ extensions ,
124
+ this . _options . extensions . map ( ext => '.' + NATIVE_PLATFORM + ext ) ,
124
125
) ;
125
126
}
126
127
if ( defaultPlatform ) {
127
- extensions . unshift (
128
- ...this . _options . extensions . map ( ext => '.' + defaultPlatform + ext ) ,
128
+ extensions . unshift . apply (
129
+ extensions ,
130
+ this . _options . extensions . map ( ext => '.' + defaultPlatform + ext ) ,
129
131
) ;
130
132
}
131
133
You can’t perform that action at this time.
0 commit comments