From 6d76918424e21bfcaaed532945755a8be3754895 Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Sat, 22 Jul 2017 22:42:35 +0100 Subject: [PATCH] Fix improper type tests is core test cases --- test/nodes/core/core/20-inject_spec.js | 2 +- test/nodes/core/io/22-websocket_spec.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/test/nodes/core/core/20-inject_spec.js b/test/nodes/core/core/20-inject_spec.js index ff239db56..1dbb4cd35 100644 --- a/test/nodes/core/core/20-inject_spec.js +++ b/test/nodes/core/core/20-inject_spec.js @@ -75,7 +75,7 @@ describe('inject node', function() { var n3 = helper.getNode("n3"); n3.on("input", function(msg) { msg.should.have.property('topic', 't3'); - msg.should.have.property('payload').be.a.Number; + msg.should.have.property('payload').be.a.Number(); helper.clearFlows().then(function() { done(); }); diff --git a/test/nodes/core/io/22-websocket_spec.js b/test/nodes/core/io/22-websocket_spec.js index 75a71714f..d574ac2e0 100644 --- a/test/nodes/core/io/22-websocket_spec.js +++ b/test/nodes/core/io/22-websocket_spec.js @@ -422,7 +422,8 @@ describe('websocket Node', function() { helper.load(websocketNode, flow, function() { getSocket('server').on('connection', function(sock) { sock.on('message', function(msg) { - msg.should.have.length(5).and.be.a.buffer; + Buffer.isBuffer(msg).should.be.true(); + msg.should.have.length(5); done(); }); });