mirror of
				https://github.com/node-red/node-red.git
				synced 2025-03-01 10:36:34 +00:00 
			
		
		
		
	Merge pull request #282 from hindessm/more-node-tests
Test that wires to non-existent nodes are ignored.
This commit is contained in:
		@@ -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() {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user