@@ -188,6 +188,7 @@ describe("runs", () => {
188
188
setLocalStub = sandbox . stub ( ) ;
189
189
setLocalIdentifierStub = sandbox . stub ( ) ;
190
190
deleteResultsStub = sandbox . stub ( ) ;
191
+ getNumberOfSpecFilesStub = sandbox . stub ( ) . returns ( [ ] ) ;
191
192
setDefaultsStub = sandbox . stub ( ) ;
192
193
} ) ;
193
194
@@ -217,7 +218,8 @@ describe("runs", () => {
217
218
setLocal : setLocalStub ,
218
219
setLocalIdentifier : setLocalIdentifierStub ,
219
220
deleteResults : deleteResultsStub ,
220
- setDefaults : setDefaultsStub
221
+ setDefaults : setDefaultsStub ,
222
+ getNumberOfSpecFiles : getNumberOfSpecFilesStub
221
223
} ,
222
224
'../helpers/capabilityHelper' : {
223
225
validate : capabilityValidatorStub ,
@@ -241,6 +243,7 @@ describe("runs", () => {
241
243
. catch ( ( error ) => {
242
244
sinon . assert . calledOnce ( getConfigPathStub ) ;
243
245
sinon . assert . calledOnce ( getConfigPathStub ) ;
246
+ sinon . assert . calledOnce ( getNumberOfSpecFilesStub ) ;
244
247
sinon . assert . calledOnce ( setParallelsStub ) ;
245
248
sinon . assert . calledOnce ( setLocalStub ) ;
246
249
sinon . assert . calledOnce ( setLocalIdentifierStub ) ;
@@ -288,6 +291,7 @@ describe("runs", () => {
288
291
setLocalStub = sandbox . stub ( ) ;
289
292
setLocalIdentifierStub = sandbox . stub ( ) ;
290
293
deleteResultsStub = sandbox . stub ( ) ;
294
+ getNumberOfSpecFilesStub = sandbox . stub ( ) . returns ( [ ] ) ;
291
295
setDefaultsStub = sandbox . stub ( ) ;
292
296
} ) ;
293
297
@@ -317,6 +321,7 @@ describe("runs", () => {
317
321
setLocal : setLocalStub ,
318
322
setLocalIdentifier : setLocalIdentifierStub ,
319
323
deleteResults : deleteResultsStub ,
324
+ getNumberOfSpecFiles : getNumberOfSpecFilesStub ,
320
325
setDefaults : setDefaultsStub
321
326
} ,
322
327
'../helpers/capabilityHelper' : {
@@ -345,6 +350,7 @@ describe("runs", () => {
345
350
. catch ( ( error ) => {
346
351
sinon . assert . calledOnce ( getConfigPathStub ) ;
347
352
sinon . assert . calledOnce ( getConfigPathStub ) ;
353
+ sinon . assert . calledOnce ( getNumberOfSpecFilesStub ) ;
348
354
sinon . assert . calledOnce ( setParallelsStub ) ;
349
355
sinon . assert . calledOnce ( setLocalStub ) ;
350
356
sinon . assert . calledOnce ( setLocalIdentifierStub ) ;
@@ -396,6 +402,7 @@ describe("runs", () => {
396
402
setLocalStub = sandbox . stub ( ) ;
397
403
setLocalIdentifierStub = sandbox . stub ( ) ;
398
404
deleteResultsStub = sandbox . stub ( ) ;
405
+ getNumberOfSpecFilesStub = sandbox . stub ( ) . returns ( [ ] ) ;
399
406
setDefaultsStub = sandbox . stub ( ) ;
400
407
} ) ;
401
408
@@ -425,6 +432,7 @@ describe("runs", () => {
425
432
setLocal : setLocalStub ,
426
433
setLocalIdentifier : setLocalIdentifierStub ,
427
434
deleteResults : deleteResultsStub ,
435
+ getNumberOfSpecFiles : getNumberOfSpecFilesStub ,
428
436
setDefaults : setDefaultsStub
429
437
} ,
430
438
'../helpers/capabilityHelper' : {
@@ -461,6 +469,7 @@ describe("runs", () => {
461
469
sinon . assert . calledOnce ( getConfigPathStub ) ;
462
470
sinon . assert . calledOnce ( validateBstackJsonStub ) ;
463
471
sinon . assert . calledOnce ( capabilityValidatorStub ) ;
472
+ sinon . assert . calledOnce ( getNumberOfSpecFilesStub ) ;
464
473
sinon . assert . calledOnce ( setParallelsStub ) ;
465
474
sinon . assert . calledOnce ( setLocalStub ) ;
466
475
sinon . assert . calledOnce ( setLocalIdentifierStub ) ;
@@ -516,6 +525,7 @@ describe("runs", () => {
516
525
isUndefinedStub = sandbox . stub ( ) ;
517
526
setLocalStub = sandbox . stub ( ) ;
518
527
setLocalIdentifierStub = sandbox . stub ( ) ;
528
+ getNumberOfSpecFilesStub = sandbox . stub ( ) . returns ( [ ] ) ;
519
529
} ) ;
520
530
521
531
afterEach ( ( ) => {
@@ -529,8 +539,8 @@ describe("runs", () => {
529
539
let message = `Success! ${ Constants . userMessages . BUILD_CREATED } with build id: random_build_id` ;
530
540
let dashboardLink = `${ Constants . userMessages . VISIT_DASHBOARD } ${ dashboardUrl } ` ;
531
541
532
- const runs = proxyquire ( " ../../../../bin/commands/runs" , {
533
- " ../helpers/utils" : {
542
+ const runs = proxyquire ( ' ../../../../bin/commands/runs' , {
543
+ ' ../helpers/utils' : {
534
544
validateBstackJson : validateBstackJsonStub ,
535
545
sendUsageReport : sendUsageReportStub ,
536
546
setUsername : setUsernameStub ,
@@ -547,24 +557,25 @@ describe("runs", () => {
547
557
exportResults : exportResultsStub ,
548
558
deleteResults : deleteResultsStub ,
549
559
setDefaults : setDefaultsStub ,
550
- isUndefined : isUndefinedStub
560
+ isUndefined : isUndefinedStub ,
561
+ getNumberOfSpecFiles : getNumberOfSpecFilesStub
551
562
} ,
552
- " ../helpers/capabilityHelper" : {
563
+ ' ../helpers/capabilityHelper' : {
553
564
validate : capabilityValidatorStub ,
554
565
} ,
555
- " ../helpers/archiver" : {
566
+ ' ../helpers/archiver' : {
556
567
archive : archiverStub ,
557
568
} ,
558
- " ../helpers/fileHelpers" : {
569
+ ' ../helpers/fileHelpers' : {
559
570
deleteZip : deleteZipStub ,
560
571
} ,
561
- " ../helpers/zipUpload" : {
572
+ ' ../helpers/zipUpload' : {
562
573
zipUpload : zipUploadStub ,
563
574
} ,
564
- " ../helpers/build" : {
575
+ ' ../helpers/build' : {
565
576
createBuild : createBuildStub ,
566
577
} ,
567
- " ../helpers/config" : {
578
+ ' ../helpers/config' : {
568
579
dashboardUrl : dashboardUrl ,
569
580
} ,
570
581
} ) ;
@@ -586,6 +597,7 @@ describe("runs", () => {
586
597
sinon . assert . calledOnce ( getConfigPathStub ) ;
587
598
sinon . assert . calledOnce ( validateBstackJsonStub ) ;
588
599
sinon . assert . calledOnce ( capabilityValidatorStub ) ;
600
+ sinon . assert . calledOnce ( getNumberOfSpecFilesStub ) ;
589
601
sinon . assert . calledOnce ( setParallelsStub ) ;
590
602
sinon . assert . calledOnce ( setLocalStub ) ;
591
603
sinon . assert . calledOnce ( setLocalIdentifierStub ) ;
0 commit comments