Skip to content

Commit

Permalink
fix: improve test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
BelfordZ committed Jul 26, 2019
1 parent 60c48ca commit 7e59301
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/RequestManager.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,4 +150,14 @@ describe("client-js", () => {
});
});

describe("stopBatch", () => {
it("does nothing if the batch is empty", () => {
const transport = new EventEmitterTransport("foo://unique-uri");
transport.sendData = jest.fn();
const c = new RequestManager([transport]);
c.startBatch();
c.stopBatch();
expect(transport.sendData).not.toHaveBeenCalled();
});
});
});

0 comments on commit 7e59301

Please sign in to comment.