Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions lib/git.js
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,7 @@ class Git extends EventEmitter {
* @param {Buffer|String=} options.key - the key file for the https server
* @param {Buffer|String=} options.cert - the cert file for the https server
* @param {Function} callback - the function to call when server is started or error has occured
* @return {Git} - the Git instance, useful for chaining
*/
listen(port, options, callback) {
const self = this;
Expand All @@ -447,6 +448,7 @@ class Git extends EventEmitter {
});

this.server.listen(port, callback);
return this;
}
/**
* closes the server instance
Expand Down
2 changes: 1 addition & 1 deletion test/git.js
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,7 @@ test('git', (t) => {

const repos = new GitServer(repoDir);
const port = Math.floor(Math.random() * ((1 << 16) - 1e4)) + 1e4;
repos.listen(port);
t.equal(repos.listen(port), repos);

process.chdir(srcDir);
async.waterfall([
Expand Down