Skip to content

Commit

Permalink
fix: change log type of "Disconnected!" to info
Browse files Browse the repository at this point in the history
  • Loading branch information
oles authored Aug 30, 2021
1 parent 0b8ebd6 commit fde27f5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion client-src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ const onSocketMessage = {
log.error(error);
},
close() {
log.error("Disconnected!");
log.info("Disconnected!");

sendMessage("Close");
},
Expand Down
6 changes: 3 additions & 3 deletions test/client/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ describe("index", () => {
test("should run onSocketMessage.close", () => {
onSocketMessage.close();

expect(log.log.error.mock.calls[0][0]).toMatchSnapshot();
expect(log.log.info.mock.calls[0][0]).toMatchSnapshot();
expect(sendMessage.mock.calls[0][0]).toMatchSnapshot();
});

Expand All @@ -223,7 +223,7 @@ describe("index", () => {
onSocketMessage.hot();
onSocketMessage.close();

expect(log.log.error.mock.calls[0][0]).toMatchSnapshot();
expect(log.log.info.mock.calls[1][0]).toMatchSnapshot();
expect(sendMessage.mock.calls[0][0]).toMatchSnapshot();
});

Expand All @@ -232,7 +232,7 @@ describe("index", () => {
onSocketMessage.liveReload();
onSocketMessage.close();

expect(log.log.error.mock.calls[0][0]).toMatchSnapshot();
expect(log.log.info.mock.calls[1][0]).toMatchSnapshot();
expect(sendMessage.mock.calls[0][0]).toMatchSnapshot();
});

Expand Down

0 comments on commit fde27f5

Please sign in to comment.