From 500af2e351ca3127f1df5a70f5c3809d0da57a58 Mon Sep 17 00:00:00 2001 From: Marvin Roger Date: Wed, 12 Apr 2017 10:50:27 +0200 Subject: [PATCH] :bug: Fix some tests --- test/test_event_socket.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/test_event_socket.js b/test/test_event_socket.js index 3fec047..13cd398 100644 --- a/test/test_event_socket.js +++ b/test/test_event_socket.js @@ -97,7 +97,7 @@ describe('EventSocket', function() { var ws = new Ws(); var client = new EventSocket(ws, 'some-topic', { streamEnabled: true }); ws.on('onsend', function(data, options, cb) { - assert.equal(data, '{"data":null}'); + assert.deepStrictEqual(JSON.parse(data), { data: null }); done(); }); client.send('some/topic', { data: null }); @@ -107,7 +107,7 @@ describe('EventSocket', function() { var ws = new Ws(); var client = new EventSocket(ws, 'some-topic', { streamEnabled: false }); ws.on('onsend', function(data, options, cb) { - assert.equal(data, '{"data":null}'); + assert.deepStrictEqual(JSON.parse(data), { data: null }); done(); }); client.send('some/topic', { data: null });