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

fix trigger tests

This commit is contained in:
Dave Conway-Jones 2016-02-04 21:22:52 +00:00
parent 827711ca89
commit d3a29a6f16

View File

@ -35,8 +35,8 @@ describe('trigger Node', function() {
helper.load(triggerNode, flow, function() {
var n1 = helper.getNode("n1");
n1.should.have.property('name', 'triggerNode');
n1.should.have.property('op1', 1);
n1.should.have.property('op2', 0);
n1.should.have.property('op1', '1');
n1.should.have.property('op2', '0');
n1.should.have.property('op1type', 'val');
n1.should.have.property('op2type', 'val');
n1.should.have.property('extend', "false");
@ -82,11 +82,11 @@ describe('trigger Node', function() {
var c = 0;
n2.on("input", function(msg) {
if (c === 0) {
msg.should.have.a.property("payload", 1);
msg.should.have.a.property("payload", '1');
c+=1;
}
else {
msg.should.have.a.property("payload", 0);
msg.should.have.a.property("payload", '0');
done();
}
});
@ -103,11 +103,11 @@ describe('trigger Node', function() {
var c = 0;
n2.on("input", function(msg) {
if (c === 0) {
msg.should.have.a.property("payload", 1);
msg.should.have.a.property("payload", '1');
c+=1;
}
else {
msg.should.have.a.property("payload", 0);
msg.should.have.a.property("payload", '0');
}
});
setTimeout( function() {