File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -433,6 +433,7 @@ class Git extends EventEmitter {
433
433
* @param {Buffer|String= } options.key - the key file for the https server
434
434
* @param {Buffer|String= } options.cert - the cert file for the https server
435
435
* @param {Function } callback - the function to call when server is started or error has occured
436
+ * @return {Git } - the Git instance, useful for chaining
436
437
*/
437
438
listen ( port , options , callback ) {
438
439
const self = this ;
@@ -447,6 +448,7 @@ class Git extends EventEmitter {
447
448
} ) ;
448
449
449
450
this . server . listen ( port , callback ) ;
451
+ return this ;
450
452
}
451
453
/**
452
454
* closes the server instance
Original file line number Diff line number Diff line change @@ -604,7 +604,7 @@ test('git', (t) => {
604
604
605
605
const repos = new GitServer ( repoDir ) ;
606
606
const port = Math . floor ( Math . random ( ) * ( ( 1 << 16 ) - 1e4 ) ) + 1e4 ;
607
- repos . listen ( port ) ;
607
+ t . equal ( repos . listen ( port ) , repos ) ;
608
608
609
609
process . chdir ( srcDir ) ;
610
610
async . waterfall ( [
You can’t perform that action at this time.
0 commit comments