mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
enhance a couple of tests to check more
Delay node checks times properly for both types of queue. And File checks to make sure other payload types are handled (a bit better than they were)
This commit is contained in:
@@ -71,13 +71,17 @@ describe('file Nodes', function() {
|
||||
n1.emit("input", {payload:"test2"}); // string
|
||||
setTimeout(function() {
|
||||
n1.emit("input", {payload:true}); // boolean
|
||||
n1.emit("input", {payload:1});
|
||||
n1.emit("input", {payload:[2]});
|
||||
},50);
|
||||
},30);
|
||||
setTimeout(function() {
|
||||
n1.emit("input", {payload:999}); // number
|
||||
},60);
|
||||
setTimeout(function() {
|
||||
n1.emit("input", {payload:[2]}); // object (array)
|
||||
},90);
|
||||
setTimeout(function() {
|
||||
var f = fs.readFileSync(fileToTest).toString();
|
||||
f.should.have.length(17);
|
||||
f.should.equal("test2\ntrue\n1\n[2]\n");
|
||||
f.should.have.length(19);
|
||||
f.should.equal("test2\ntrue\n999\n[2]\n");
|
||||
done();
|
||||
},wait);
|
||||
});
|
||||
|
Reference in New Issue
Block a user