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

Fix html parse node test

This commit is contained in:
Dave Conway-Jones 2016-07-20 20:58:52 +01:00
parent 8eebb6ea2d
commit e81e48cde3

View File

@ -48,7 +48,7 @@ describe('html node', function() {
}); });
}); });
it('should retrieve header contents as default', function(done) { it('should retrieve header contents if asked to by msg.select', function(done) {
fs.readFile(file, 'utf8', function(err, data) { fs.readFile(file, 'utf8', function(err, data) {
var flow = [{id:"n1",type:"html",wires:[["n2"]],func:"return msg;"}, var flow = [{id:"n1",type:"html",wires:[["n2"]],func:"return msg;"},
{id:"n2", type:"helper"}]; {id:"n2", type:"helper"}];
@ -61,7 +61,7 @@ describe('html node', function() {
should.equal(msg.payload, 'This is a test page for node 70-HTML'); should.equal(msg.payload, 'This is a test page for node 70-HTML');
done(); done();
}); });
n1.receive({payload:data,topic: "bar"}); n1.receive({payload:data,topic:"bar",select:"h1"});
}); });
}); });
}); });