MCPcopy
hub / github.com/node-red/node-red / checkNodes

Function checkNodes

test/unit/@node-red/registry/lib/localfilesystem_spec.js:57–68  ·  view source on GitHub ↗
(nodes,shouldHaveNodes,shouldNotHaveNodes,module)

Source from the content-addressed store, hash-verified

55 }
56 })
57 function checkNodes(nodes,shouldHaveNodes,shouldNotHaveNodes,module) {
58 for (var i=0;i<shouldHaveNodes.length;i++) {
59 nodes.should.have.a.property(shouldHaveNodes[i]);
60 nodes[shouldHaveNodes[i]].should.have.a.property('file');
61 nodes[shouldHaveNodes[i]].file.should.equal(path.resolve(nodes[shouldHaveNodes[i]].file));
62 nodes[shouldHaveNodes[i]].should.have.a.property('module',module||'node-red');
63 nodes[shouldHaveNodes[i]].should.have.a.property('name',shouldHaveNodes[i]);
64 }
65 for (i=0;i<shouldNotHaveNodes.length;i++) {
66 nodes.should.not.have.a.property(shouldNotHaveNodes[i]);
67 }
68 }
69 describe("#getNodeFiles",function() {
70 it("Finds all the node files in the resources tree",function(done) {
71 localfilesystem.init({coreNodesDir:resourcesDir});

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected