Sitelet https://github.com/open-rpc/client-js/commit/7e59301
Skip to content

Commit 7e59301

Browse files
committed
fix: improve test coverage
1 parent 60c48ca commit 7e59301

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

‎src/RequestManager.test.ts‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,4 +150,14 @@ describe("client-js", () => {
150150
});
151151
});
152152

153+
describe("stopBatch", () => {
154+
it("does nothing if the batch is empty", () => {
155+
const transport = new EventEmitterTransport("foo://unique-uri");
156+
transport.sendData = jest.fn();
157+
const c = new RequestManager([transport]);
158+
c.startBatch();
159+
c.stopBatch();
160+
expect(transport.sendData).not.toHaveBeenCalled();
161+
});
162+
});
153163
});

0 commit comments

Comments
 (0)