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

And fix the JSON node test

This commit is contained in:
Dave Conway-Jones 2019-02-15 17:16:27 +00:00
parent 28d4084aa0
commit 0748dff355
No known key found for this signature in database
GPG Key ID: 9E7F9C73F5168CD4

View File

@ -173,20 +173,14 @@ describe('JSON node', function() {
var logEvents = helper.log().args.filter(function(evt) {
return evt[0].type == "json";
});
logEvents.should.have.length(3);
logEvents.should.have.length(1);
logEvents[0][0].should.have.a.property('msg');
logEvents[0][0].msg.toString().should.eql('json.errors.dropped');
logEvents[1][0].should.have.a.property('msg');
logEvents[1][0].msg.toString().should.eql('json.errors.dropped');
logEvents[2][0].should.have.a.property('msg');
logEvents[2][0].msg.toString().should.eql('json.errors.dropped-object');
logEvents[0][0].msg.toString().should.eql('json.errors.dropped-object');
done();
} catch(err) {
done(err);
}
},150);
jn1.receive({payload:true});
jn1.receive({payload:1});
},50);
jn1.receive({payload:Buffer.from("a")});
});
});