mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Test that wires to non-existent nodes are ignored.
This commit is contained in:
parent
9d481858a0
commit
1414308179
@ -186,6 +186,24 @@ describe('Node', function() {
|
|||||||
n1.send();
|
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() {
|
describe('#log', function() {
|
||||||
|
Loading…
Reference in New Issue
Block a user