Skip to content

Commit

Permalink
test: refactor RawServerMock
Browse files Browse the repository at this point in the history
Original commit: 16d8c85

PR-URL: #120
Reviewed-By: Mykola Bilochub <nbelochub@gmail.com>
  • Loading branch information
aqrln committed Apr 3, 2017
1 parent 8340dbc commit 70ffa59
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions test/unit/mock/raw-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,16 @@ function RawServerMock() {

util.inherits(RawServerMock, events.EventEmitter);

RawServerMock.prototype.listen = function(callback) {
if (callback) {
callback();
}
};
RawServerMock.prototype.listen = pass;

RawServerMock.prototype.close = function(callback) {
if (callback) {
callback();
}
};
RawServerMock.prototype.close = pass;

RawServerMock.prototype.createTransport = function() {
return new TransportMock();
};

function pass(callback) {
if (callback) {
callback();
}
}

0 comments on commit 70ffa59

Please sign in to comment.