mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Merge branch 'pr_2705'
This commit is contained in:
commit
5be25d9538
@ -361,6 +361,7 @@ function getModuleFiles(module) {
|
|||||||
nodeList[moduleFile.package.name] = {
|
nodeList[moduleFile.package.name] = {
|
||||||
name: moduleFile.package.name,
|
name: moduleFile.package.name,
|
||||||
version: moduleFile.package.version,
|
version: moduleFile.package.version,
|
||||||
|
path: moduleFile.dir,
|
||||||
nodes: {},
|
nodes: {},
|
||||||
icons: nodeModuleFiles.icons,
|
icons: nodeModuleFiles.icons,
|
||||||
examples: nodeModuleFiles.examples
|
examples: nodeModuleFiles.examples
|
||||||
|
@ -144,16 +144,20 @@ describe("red/nodes/registry/localfilesystem",function() {
|
|||||||
var nodeList = localfilesystem.getNodeFiles();
|
var nodeList = localfilesystem.getNodeFiles();
|
||||||
nodeList.should.have.a.property("node-red");
|
nodeList.should.have.a.property("node-red");
|
||||||
var nm = nodeList['node-red'];
|
var nm = nodeList['node-red'];
|
||||||
|
// The `node-red` module is loaded differently to those scanned for
|
||||||
|
// It doesn't get the `path` property set. Maybe it should.
|
||||||
nm.should.have.a.property('name','node-red');
|
nm.should.have.a.property('name','node-red');
|
||||||
nm.should.have.a.property("nodes");
|
nm.should.have.a.property("nodes");
|
||||||
checkNodes(nm.nodes,[],['TestNode1']);
|
checkNodes(nm.nodes,[],['TestNode1']);
|
||||||
|
|
||||||
nm = nodeList['TestNodeModule'];
|
nm = nodeList['TestNodeModule'];
|
||||||
|
nm.should.have.a.property('path')
|
||||||
nm.should.have.a.property('name','TestNodeModule');
|
nm.should.have.a.property('name','TestNodeModule');
|
||||||
nm.should.have.a.property("nodes");
|
nm.should.have.a.property("nodes");
|
||||||
checkNodes(nm.nodes,['TestNodeMod1','TestNodeMod2'],[],'TestNodeModule');
|
checkNodes(nm.nodes,['TestNodeMod1','TestNodeMod2'],[],'TestNodeModule');
|
||||||
|
|
||||||
nm = nodeList['VersionMismatchModule'];
|
nm = nodeList['VersionMismatchModule'];
|
||||||
|
nm.should.have.a.property('path')
|
||||||
nm.should.have.a.property('name','VersionMismatchModule');
|
nm.should.have.a.property('name','VersionMismatchModule');
|
||||||
nm.should.have.a.property("nodes");
|
nm.should.have.a.property("nodes");
|
||||||
checkNodes(nm.nodes,['VersionMismatchMod1','VersionMismatchMod2'],[],'VersionMismatchModule');
|
checkNodes(nm.nodes,['VersionMismatchMod1','VersionMismatchMod2'],[],'VersionMismatchModule');
|
||||||
@ -243,6 +247,8 @@ describe("red/nodes/registry/localfilesystem",function() {
|
|||||||
nodeModule['TestNodeModule'].should.have.a.property('name','TestNodeModule');
|
nodeModule['TestNodeModule'].should.have.a.property('name','TestNodeModule');
|
||||||
nodeModule['TestNodeModule'].should.have.a.property('version','0.0.1');
|
nodeModule['TestNodeModule'].should.have.a.property('version','0.0.1');
|
||||||
nodeModule['TestNodeModule'].should.have.a.property('nodes');
|
nodeModule['TestNodeModule'].should.have.a.property('nodes');
|
||||||
|
nodeModule['TestNodeModule'].should.have.a.property('path');
|
||||||
|
|
||||||
checkNodes(nodeModule['TestNodeModule'].nodes,['TestNodeMod1','TestNodeMod2'],[],'TestNodeModule');
|
checkNodes(nodeModule['TestNodeModule'].nodes,['TestNodeMod1','TestNodeMod2'],[],'TestNodeModule');
|
||||||
|
|
||||||
nodeModule = localfilesystem.getModuleFiles('VersionMismatchModule');
|
nodeModule = localfilesystem.getModuleFiles('VersionMismatchModule');
|
||||||
|
Loading…
Reference in New Issue
Block a user