diff --git a/test/red/runtime/nodes/resources/local/TestNodeModule/node_modules/EmptyModule/file.txt b/test/red/runtime/nodes/resources/local/TestNodeModule/node_modules/EmptyModule/file.txt new file mode 100644 index 000000000..0ce8dcaed --- /dev/null +++ b/test/red/runtime/nodes/resources/local/TestNodeModule/node_modules/EmptyModule/file.txt @@ -0,0 +1 @@ +This file exists just to ensure the parent directory is in the repository. diff --git a/test/red/runtime/nodes/resources/local/TestNodeModule/node_modules/TestNodeModule/TestNodeModule.html b/test/red/runtime/nodes/resources/local/TestNodeModule/node_modules/TestNodeModule/TestNodeModule.html new file mode 100644 index 000000000..17483f7ca --- /dev/null +++ b/test/red/runtime/nodes/resources/local/TestNodeModule/node_modules/TestNodeModule/TestNodeModule.html @@ -0,0 +1,5 @@ + + + + +
this should be filtered out
diff --git a/test/red/runtime/nodes/resources/local/TestNodeModule/node_modules/TestNodeModule/TestNodeModule.js b/test/red/runtime/nodes/resources/local/TestNodeModule/node_modules/TestNodeModule/TestNodeModule.js new file mode 100644 index 000000000..c79c2ceb6 --- /dev/null +++ b/test/red/runtime/nodes/resources/local/TestNodeModule/node_modules/TestNodeModule/TestNodeModule.js @@ -0,0 +1,5 @@ +// A test node that exports a function +module.exports = function(RED) { + function TestNode(n) {} + RED.nodes.registerType("test-node-mod-1",TestNode); +} diff --git a/test/red/runtime/nodes/resources/local/TestNodeModule/node_modules/TestNodeModule/TestNodeModule2.html b/test/red/runtime/nodes/resources/local/TestNodeModule/node_modules/TestNodeModule/TestNodeModule2.html new file mode 100644 index 000000000..a1f1b6c79 --- /dev/null +++ b/test/red/runtime/nodes/resources/local/TestNodeModule/node_modules/TestNodeModule/TestNodeModule2.html @@ -0,0 +1,5 @@ + + + + +this should be filtered out
diff --git a/test/red/runtime/nodes/resources/local/TestNodeModule/node_modules/TestNodeModule/TestNodeModule2.js b/test/red/runtime/nodes/resources/local/TestNodeModule/node_modules/TestNodeModule/TestNodeModule2.js new file mode 100644 index 000000000..d359fb3f2 --- /dev/null +++ b/test/red/runtime/nodes/resources/local/TestNodeModule/node_modules/TestNodeModule/TestNodeModule2.js @@ -0,0 +1,4 @@ +// A test node that exports a function +module.exports = function(RED) { + throw new Error("fail to load"); +} diff --git a/test/red/runtime/nodes/resources/local/TestNodeModule/node_modules/TestNodeModule/icons/file.txt b/test/red/runtime/nodes/resources/local/TestNodeModule/node_modules/TestNodeModule/icons/file.txt new file mode 100644 index 000000000..59a29af14 --- /dev/null +++ b/test/red/runtime/nodes/resources/local/TestNodeModule/node_modules/TestNodeModule/icons/file.txt @@ -0,0 +1,3 @@ +This file exists just to ensure the 'icons' directory is in the repository. +TODO: a future test needs to ensure the right icon files are loaded - this + directory can be used for that diff --git a/test/red/runtime/nodes/resources/local/TestNodeModule/node_modules/TestNodeModule/package.json b/test/red/runtime/nodes/resources/local/TestNodeModule/node_modules/TestNodeModule/package.json new file mode 100644 index 000000000..8eba5b04b --- /dev/null +++ b/test/red/runtime/nodes/resources/local/TestNodeModule/node_modules/TestNodeModule/package.json @@ -0,0 +1,11 @@ +{ + "name" : "TestNodeModule", + "version" : "0.0.1", + "description" : "A test node module", + "node-red" : { + "nodes": { + "TestNodeMod1": "TestNodeModule.js", + "TestNodeMod2": "TestNodeModule2.js" + } + } +} diff --git a/test/red/runtime/nodes/resources/local/TestNodeModule/node_modules/VersionMismatchModule/TestNodeModule.html b/test/red/runtime/nodes/resources/local/TestNodeModule/node_modules/VersionMismatchModule/TestNodeModule.html new file mode 100644 index 000000000..17483f7ca --- /dev/null +++ b/test/red/runtime/nodes/resources/local/TestNodeModule/node_modules/VersionMismatchModule/TestNodeModule.html @@ -0,0 +1,5 @@ + + + + +this should be filtered out
diff --git a/test/red/runtime/nodes/resources/local/TestNodeModule/node_modules/VersionMismatchModule/TestNodeModule.js b/test/red/runtime/nodes/resources/local/TestNodeModule/node_modules/VersionMismatchModule/TestNodeModule.js new file mode 100644 index 000000000..c79c2ceb6 --- /dev/null +++ b/test/red/runtime/nodes/resources/local/TestNodeModule/node_modules/VersionMismatchModule/TestNodeModule.js @@ -0,0 +1,5 @@ +// A test node that exports a function +module.exports = function(RED) { + function TestNode(n) {} + RED.nodes.registerType("test-node-mod-1",TestNode); +} diff --git a/test/red/runtime/nodes/resources/local/TestNodeModule/node_modules/VersionMismatchModule/TestNodeModule2.html b/test/red/runtime/nodes/resources/local/TestNodeModule/node_modules/VersionMismatchModule/TestNodeModule2.html new file mode 100644 index 000000000..a1f1b6c79 --- /dev/null +++ b/test/red/runtime/nodes/resources/local/TestNodeModule/node_modules/VersionMismatchModule/TestNodeModule2.html @@ -0,0 +1,5 @@ + + + + +this should be filtered out
diff --git a/test/red/runtime/nodes/resources/local/TestNodeModule/node_modules/VersionMismatchModule/TestNodeModule2.js b/test/red/runtime/nodes/resources/local/TestNodeModule/node_modules/VersionMismatchModule/TestNodeModule2.js new file mode 100644 index 000000000..d359fb3f2 --- /dev/null +++ b/test/red/runtime/nodes/resources/local/TestNodeModule/node_modules/VersionMismatchModule/TestNodeModule2.js @@ -0,0 +1,4 @@ +// A test node that exports a function +module.exports = function(RED) { + throw new Error("fail to load"); +} diff --git a/test/red/runtime/nodes/resources/local/TestNodeModule/node_modules/VersionMismatchModule/icons/file.txt b/test/red/runtime/nodes/resources/local/TestNodeModule/node_modules/VersionMismatchModule/icons/file.txt new file mode 100644 index 000000000..59a29af14 --- /dev/null +++ b/test/red/runtime/nodes/resources/local/TestNodeModule/node_modules/VersionMismatchModule/icons/file.txt @@ -0,0 +1,3 @@ +This file exists just to ensure the 'icons' directory is in the repository. +TODO: a future test needs to ensure the right icon files are loaded - this + directory can be used for that diff --git a/test/red/runtime/nodes/resources/local/TestNodeModule/node_modules/VersionMismatchModule/package.json b/test/red/runtime/nodes/resources/local/TestNodeModule/node_modules/VersionMismatchModule/package.json new file mode 100644 index 000000000..4f9e46518 --- /dev/null +++ b/test/red/runtime/nodes/resources/local/TestNodeModule/node_modules/VersionMismatchModule/package.json @@ -0,0 +1,12 @@ +{ + "name" : "VersionMismatchModule", + "version" : "0.0.1", + "description" : "A test node module", + "node-red" : { + "version": "100.0.0", + "nodes": { + "VersionMismatchMod1": "TestNodeModule.js", + "VersionMismatchMod2": "TestNodeModule2.js" + } + } +}