Skip to content

Commit

Permalink
fix: set onData to private
Browse files Browse the repository at this point in the history
  • Loading branch information
shanejonas committed May 14, 2019
1 parent b4e9698 commit 992c73d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
8 changes: 0 additions & 8 deletions src/RequestManager.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,4 @@ describe("client-js", () => {
c.request("foo", []);
});

it("can handle onData", () => {
const transport = new EventEmitterTransport("foo://unique-uri");
const c = new RequestManager([transport]);
const data = "{\"result\": \"bar\", \"id\": 1}";
c.request("foo", []);
c.onData(data);
});

});
2 changes: 1 addition & 1 deletion src/RequestManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class RequestManager {
transport.close();
});
}
public onData(data: string): void {
private onData(data: string): void {
const parsedData = JSON.parse(data);
if (typeof parsedData.result === "undefined") {
return;
Expand Down

0 comments on commit 992c73d

Please sign in to comment.