From 3c3140a1006cd4d916d8a086a8fca0faf90dc3cd Mon Sep 17 00:00:00 2001 From: syuilo Date: Wed, 25 May 2022 23:19:39 +0900 Subject: [PATCH] refactor: use === --- packages/backend/test/utils.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/backend/test/utils.ts b/packages/backend/test/utils.ts index 4e98f1332..5eb4ed3b0 100644 --- a/packages/backend/test/utils.ts +++ b/packages/backend/test/utils.ts @@ -100,9 +100,9 @@ export function connectStream(user: any, channel: string, listener: (message: Re ws.on('open', () => { ws.on('message', data => { const msg = JSON.parse(data.toString()); - if (msg.type == 'channel' && msg.body.id == 'a') { + if (msg.type === 'channel' && msg.body.id === 'a') { listener(msg.body); - } else if (msg.type == 'connected' && msg.body.id == 'a') { + } else if (msg.type === 'connected' && msg.body.id === 'a') { res(ws); } });