File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -87,18 +87,24 @@ describe("outputMergedBranches", () => {
8787 const remoteDelete = `git push origin --delete ${ branches . join ( " " ) } ` ;
8888 expect ( infoSpy ) . toHaveBeenNthCalledWith ( 3 , "\nRun the following to delete branches locally and remotely:" ) ;
8989 expect ( infoSpy ) . toHaveBeenNthCalledWith ( 4 , `${ localDelete } && ${ remoteDelete } ` ) ;
90+ expect ( infoSpy ) . toHaveBeenCalledTimes ( 4 ) ;
91+ expect ( warnSpy ) . not . toHaveBeenCalled ( ) ;
9092 } ) ;
9193
9294 it ( "should log a message when no branches are merged" , ( ) => {
9395 outputMergedBranches ( [ ] , "master" , DEFAULT_CONFIG ) ;
9496 expect ( infoSpy ) . toHaveBeenCalledWith ( "No branches merged into 'master'." ) ;
97+ expect ( infoSpy ) . toHaveBeenCalledTimes ( 1 ) ;
98+ expect ( warnSpy ) . not . toHaveBeenCalled ( ) ;
9599 } ) ;
96100
97101 it ( "should warn when issueUrlFormat is not a valid URL" , ( ) => {
98102 const branches = [ "feat/TOKEN-100" ] ;
99103 const config = { ...DEFAULT_CONFIG , issueUrlFormat : "invalid-url" } ;
100104
101105 outputMergedBranches ( branches , "master" , config ) ;
106+ expect ( infoSpy ) . toHaveBeenCalledTimes ( 4 ) ;
102107 expect ( warnSpy ) . toHaveBeenCalledWith ( "'invalid-url' is not a valid URL. Skipped formatting." ) ;
108+ expect ( warnSpy ) . toHaveBeenCalledTimes ( 1 ) ;
103109 } ) ;
104110} ) ;
You can’t perform that action at this time.
0 commit comments