@@ -188,6 +188,7 @@ describe("runs", () => {
188188 setLocalStub = sandbox . stub ( ) ;
189189 setLocalIdentifierStub = sandbox . stub ( ) ;
190190 deleteResultsStub = sandbox . stub ( ) ;
191+ getNumberOfSpecFilesStub = sandbox . stub ( ) . returns ( [ ] ) ;
191192 setDefaultsStub = sandbox . stub ( ) ;
192193 } ) ;
193194
@@ -217,7 +218,8 @@ describe("runs", () => {
217218 setLocal : setLocalStub ,
218219 setLocalIdentifier : setLocalIdentifierStub ,
219220 deleteResults : deleteResultsStub ,
220- setDefaults : setDefaultsStub
221+ setDefaults : setDefaultsStub ,
222+ getNumberOfSpecFiles : getNumberOfSpecFilesStub
221223 } ,
222224 '../helpers/capabilityHelper' : {
223225 validate : capabilityValidatorStub ,
@@ -241,6 +243,7 @@ describe("runs", () => {
241243 . catch ( ( error ) => {
242244 sinon . assert . calledOnce ( getConfigPathStub ) ;
243245 sinon . assert . calledOnce ( getConfigPathStub ) ;
246+ sinon . assert . calledOnce ( getNumberOfSpecFilesStub ) ;
244247 sinon . assert . calledOnce ( setParallelsStub ) ;
245248 sinon . assert . calledOnce ( setLocalStub ) ;
246249 sinon . assert . calledOnce ( setLocalIdentifierStub ) ;
@@ -288,6 +291,7 @@ describe("runs", () => {
288291 setLocalStub = sandbox . stub ( ) ;
289292 setLocalIdentifierStub = sandbox . stub ( ) ;
290293 deleteResultsStub = sandbox . stub ( ) ;
294+ getNumberOfSpecFilesStub = sandbox . stub ( ) . returns ( [ ] ) ;
291295 setDefaultsStub = sandbox . stub ( ) ;
292296 } ) ;
293297
@@ -317,6 +321,7 @@ describe("runs", () => {
317321 setLocal : setLocalStub ,
318322 setLocalIdentifier : setLocalIdentifierStub ,
319323 deleteResults : deleteResultsStub ,
324+ getNumberOfSpecFiles : getNumberOfSpecFilesStub ,
320325 setDefaults : setDefaultsStub
321326 } ,
322327 '../helpers/capabilityHelper' : {
@@ -345,6 +350,7 @@ describe("runs", () => {
345350 . catch ( ( error ) => {
346351 sinon . assert . calledOnce ( getConfigPathStub ) ;
347352 sinon . assert . calledOnce ( getConfigPathStub ) ;
353+ sinon . assert . calledOnce ( getNumberOfSpecFilesStub ) ;
348354 sinon . assert . calledOnce ( setParallelsStub ) ;
349355 sinon . assert . calledOnce ( setLocalStub ) ;
350356 sinon . assert . calledOnce ( setLocalIdentifierStub ) ;
@@ -396,6 +402,7 @@ describe("runs", () => {
396402 setLocalStub = sandbox . stub ( ) ;
397403 setLocalIdentifierStub = sandbox . stub ( ) ;
398404 deleteResultsStub = sandbox . stub ( ) ;
405+ getNumberOfSpecFilesStub = sandbox . stub ( ) . returns ( [ ] ) ;
399406 setDefaultsStub = sandbox . stub ( ) ;
400407 } ) ;
401408
@@ -425,6 +432,7 @@ describe("runs", () => {
425432 setLocal : setLocalStub ,
426433 setLocalIdentifier : setLocalIdentifierStub ,
427434 deleteResults : deleteResultsStub ,
435+ getNumberOfSpecFiles : getNumberOfSpecFilesStub ,
428436 setDefaults : setDefaultsStub
429437 } ,
430438 '../helpers/capabilityHelper' : {
@@ -461,6 +469,7 @@ describe("runs", () => {
461469 sinon . assert . calledOnce ( getConfigPathStub ) ;
462470 sinon . assert . calledOnce ( validateBstackJsonStub ) ;
463471 sinon . assert . calledOnce ( capabilityValidatorStub ) ;
472+ sinon . assert . calledOnce ( getNumberOfSpecFilesStub ) ;
464473 sinon . assert . calledOnce ( setParallelsStub ) ;
465474 sinon . assert . calledOnce ( setLocalStub ) ;
466475 sinon . assert . calledOnce ( setLocalIdentifierStub ) ;
@@ -516,6 +525,7 @@ describe("runs", () => {
516525 isUndefinedStub = sandbox . stub ( ) ;
517526 setLocalStub = sandbox . stub ( ) ;
518527 setLocalIdentifierStub = sandbox . stub ( ) ;
528+ getNumberOfSpecFilesStub = sandbox . stub ( ) . returns ( [ ] ) ;
519529 } ) ;
520530
521531 afterEach ( ( ) => {
@@ -529,8 +539,8 @@ describe("runs", () => {
529539 let message = `Success! ${ Constants . userMessages . BUILD_CREATED } with build id: random_build_id` ;
530540 let dashboardLink = `${ Constants . userMessages . VISIT_DASHBOARD } ${ dashboardUrl } ` ;
531541
532- const runs = proxyquire ( " ../../../../bin/commands/runs" , {
533- " ../helpers/utils" : {
542+ const runs = proxyquire ( ' ../../../../bin/commands/runs' , {
543+ ' ../helpers/utils' : {
534544 validateBstackJson : validateBstackJsonStub ,
535545 sendUsageReport : sendUsageReportStub ,
536546 setUsername : setUsernameStub ,
@@ -547,24 +557,25 @@ describe("runs", () => {
547557 exportResults : exportResultsStub ,
548558 deleteResults : deleteResultsStub ,
549559 setDefaults : setDefaultsStub ,
550- isUndefined : isUndefinedStub
560+ isUndefined : isUndefinedStub ,
561+ getNumberOfSpecFiles : getNumberOfSpecFilesStub
551562 } ,
552- " ../helpers/capabilityHelper" : {
563+ ' ../helpers/capabilityHelper' : {
553564 validate : capabilityValidatorStub ,
554565 } ,
555- " ../helpers/archiver" : {
566+ ' ../helpers/archiver' : {
556567 archive : archiverStub ,
557568 } ,
558- " ../helpers/fileHelpers" : {
569+ ' ../helpers/fileHelpers' : {
559570 deleteZip : deleteZipStub ,
560571 } ,
561- " ../helpers/zipUpload" : {
572+ ' ../helpers/zipUpload' : {
562573 zipUpload : zipUploadStub ,
563574 } ,
564- " ../helpers/build" : {
575+ ' ../helpers/build' : {
565576 createBuild : createBuildStub ,
566577 } ,
567- " ../helpers/config" : {
578+ ' ../helpers/config' : {
568579 dashboardUrl : dashboardUrl ,
569580 } ,
570581 } ) ;
@@ -586,6 +597,7 @@ describe("runs", () => {
586597 sinon . assert . calledOnce ( getConfigPathStub ) ;
587598 sinon . assert . calledOnce ( validateBstackJsonStub ) ;
588599 sinon . assert . calledOnce ( capabilityValidatorStub ) ;
600+ sinon . assert . calledOnce ( getNumberOfSpecFilesStub ) ;
589601 sinon . assert . calledOnce ( setParallelsStub ) ;
590602 sinon . assert . calledOnce ( setLocalStub ) ;
591603 sinon . assert . calledOnce ( setLocalIdentifierStub ) ;
0 commit comments