2013-10-20 22:42:01 +02:00
|
|
|
var should = require("should");
|
|
|
|
var RedNodes = require("../red/nodes.js");
|
|
|
|
|
|
|
|
var RedNode = RedNodes.Node;
|
|
|
|
|
|
|
|
describe('NodeRegistry', function() {
|
|
|
|
it('automatically registers new nodes',function() {
|
2014-03-31 15:41:51 +02:00
|
|
|
var testNode = RedNodes.getNode('123');
|
|
|
|
should.not.exist(n);
|
2013-10-20 22:42:01 +02:00
|
|
|
var n = new RedNode({id:'123',type:'abc'});
|
2014-03-31 15:41:51 +02:00
|
|
|
|
|
|
|
var newNode = RedNodes.getNode('123');
|
|
|
|
|
|
|
|
should.strictEqual(n,newNode);
|
2013-10-20 22:42:01 +02:00
|
|
|
});
|
|
|
|
})
|
|
|
|
|
|
|
|
|