File tree 2 files changed +3
-3
lines changed
2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -177,7 +177,7 @@ function launchBrowser(browser, path) {
177
177
178
178
function launchBrowsers ( config , browser ) {
179
179
setTimeout ( function ( ) {
180
- if ( Object . prototype . toString . call ( config . test_path ) === '[object Array]' ) {
180
+ if ( Array . isArray ( config . test_path ) ) {
181
181
config . multipleTest = config . test_path . length > 1 ? true : false ;
182
182
launchBrowser ( browser , config . test_path [ 0 ] ) ;
183
183
} else {
@@ -276,7 +276,7 @@ function runTests() {
276
276
launchServer ( ) ;
277
277
tunnel = new Tunnel ( config . key , serverPort , config . tunnelIdentifier , function ( ) {
278
278
statusPoller . start ( ) ;
279
- var total_runs = config . browsers . length * ( Object . prototype . toString . call ( config . test_path ) === '[object Array]' ? config . test_path . length : 1 ) ;
279
+ var total_runs = config . browsers . length * ( Array . isArray ( config . test_path ) ? config . test_path . length : 1 ) ;
280
280
logger . info ( 'Launching ' + config . browsers . length + ' worker(s) for ' + total_runs + ' run(s).' ) ;
281
281
browsers . forEach ( function ( browser ) {
282
282
if ( browser . browser_version === 'latest' ) {
Original file line number Diff line number Diff line change @@ -73,7 +73,7 @@ var formatPath = function(path) {
73
73
74
74
config . tunnelIdentifier = process . env . TUNNEL_ID || process . env . TRAVIS_JOB_ID || process . env . TRAVIS_BUILD_ID ;
75
75
76
- if ( Object . prototype . toString . call ( config . test_path ) === '[object Array]' ) {
76
+ if ( Array . isArray ( config . test_path ) ) {
77
77
config . test_path . forEach ( function ( path ) {
78
78
path = formatPath ( path ) ;
79
79
} ) ;
You can’t perform that action at this time.
0 commit comments