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

Merge pull request #282 from hindessm/more-node-tests

Test that wires to non-existent nodes are ignored.
This commit is contained in:
Nick O'Leary 2014-07-21 10:08:49 +01:00
commit 4f8ddad935

View File

@ -186,6 +186,24 @@ describe('Node', function() {
n1.send();
});
it('emits messages ignoring non-existent nodes', function(done) {
var n1 = new RedNode({id:'n1',type:'abc',wires:[['n9'],['n2']]});
var n2 = new RedNode({id:'n2',type:'abc'});
var messages = [
{payload:"hello world"},
{payload:"hello world again"}
];
n2.on('input',function(msg) {
should.deepEqual(msg,messages[1]);
should.notStrictEqual(msg,messages[1]);
done();
});
n1.send(messages);
});
});
describe('#log', function() {