Skip to content

Commit fde27f5

Browse files
authored
fix: change log type of "Disconnected!" to info
1 parent 0b8ebd6 commit fde27f5

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

client-src/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ const onSocketMessage = {
198198
log.error(error);
199199
},
200200
close() {
201-
log.error("Disconnected!");
201+
log.info("Disconnected!");
202202

203203
sendMessage("Close");
204204
},

test/client/index.test.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ describe("index", () => {
214214
test("should run onSocketMessage.close", () => {
215215
onSocketMessage.close();
216216

217-
expect(log.log.error.mock.calls[0][0]).toMatchSnapshot();
217+
expect(log.log.info.mock.calls[0][0]).toMatchSnapshot();
218218
expect(sendMessage.mock.calls[0][0]).toMatchSnapshot();
219219
});
220220

@@ -223,7 +223,7 @@ describe("index", () => {
223223
onSocketMessage.hot();
224224
onSocketMessage.close();
225225

226-
expect(log.log.error.mock.calls[0][0]).toMatchSnapshot();
226+
expect(log.log.info.mock.calls[1][0]).toMatchSnapshot();
227227
expect(sendMessage.mock.calls[0][0]).toMatchSnapshot();
228228
});
229229

@@ -232,7 +232,7 @@ describe("index", () => {
232232
onSocketMessage.liveReload();
233233
onSocketMessage.close();
234234

235-
expect(log.log.error.mock.calls[0][0]).toMatchSnapshot();
235+
expect(log.log.info.mock.calls[1][0]).toMatchSnapshot();
236236
expect(sendMessage.mock.calls[0][0]).toMatchSnapshot();
237237
});
238238

0 commit comments

Comments
 (0)