Skip to content

Commit

Permalink
Increase test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
argon committed May 1, 2016
1 parent 08781d0 commit de35e9e
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions test/connection.js
Original file line number Diff line number Diff line change
Expand Up @@ -269,10 +269,16 @@ describe("Connection", function() {
setTimeout(() => {
fakes.endpointManager.getStream.reset();
fakes.endpointManager.getStream.onCall(0).returns(fakes.streams[2]);
fakes.endpointManager.getStream.onCall(1).returns(fakes.streams[3]);
fakes.endpointManager.getStream.onCall(2).returns(fakes.streams[4]);
fakes.endpointManager.getStream.onCall(1).returns(null);
fakes.endpointManager.emit("wakeup");
}, 5);
}, 1);

setTimeout(() => {
fakes.endpointManager.getStream.reset();
fakes.endpointManager.getStream.onCall(0).returns(fakes.streams[3]);
fakes.endpointManager.getStream.onCall(1).returns(fakes.streams[4]);
fakes.endpointManager.emit("wakeup");
}, 2);
});

it("sends the correct device ID for each stream", () => {
Expand Down

0 comments on commit de35e9e

Please sign in to comment.