1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Fix improper type tests is core test cases

This commit is contained in:
Nick O'Leary 2017-07-22 22:42:35 +01:00
parent 2aced893c6
commit 6d76918424
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9
2 changed files with 3 additions and 2 deletions

View File

@ -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();
});

View File

@ -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();
});
});