From e65770a53acaba14e4f69216c6dc6c9dbe565e49 Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Sat, 14 Nov 2015 21:18:33 +0000 Subject: [PATCH] Add missing test resources They were ignored as they have node_modules in the path... --- .../TestNodeModule/node_modules/EmptyModule/file.txt | 1 + .../node_modules/TestNodeModule/TestNodeModule.html | 5 +++++ .../node_modules/TestNodeModule/TestNodeModule.js | 5 +++++ .../node_modules/TestNodeModule/TestNodeModule2.html | 5 +++++ .../node_modules/TestNodeModule/TestNodeModule2.js | 4 ++++ .../node_modules/TestNodeModule/icons/file.txt | 3 +++ .../node_modules/TestNodeModule/package.json | 11 +++++++++++ .../VersionMismatchModule/TestNodeModule.html | 5 +++++ .../VersionMismatchModule/TestNodeModule.js | 5 +++++ .../VersionMismatchModule/TestNodeModule2.html | 5 +++++ .../VersionMismatchModule/TestNodeModule2.js | 4 ++++ .../VersionMismatchModule/icons/file.txt | 3 +++ .../node_modules/VersionMismatchModule/package.json | 12 ++++++++++++ 13 files changed, 68 insertions(+) create mode 100644 test/red/runtime/nodes/resources/local/TestNodeModule/node_modules/EmptyModule/file.txt create mode 100644 test/red/runtime/nodes/resources/local/TestNodeModule/node_modules/TestNodeModule/TestNodeModule.html create mode 100644 test/red/runtime/nodes/resources/local/TestNodeModule/node_modules/TestNodeModule/TestNodeModule.js create mode 100644 test/red/runtime/nodes/resources/local/TestNodeModule/node_modules/TestNodeModule/TestNodeModule2.html create mode 100644 test/red/runtime/nodes/resources/local/TestNodeModule/node_modules/TestNodeModule/TestNodeModule2.js create mode 100644 test/red/runtime/nodes/resources/local/TestNodeModule/node_modules/TestNodeModule/icons/file.txt create mode 100644 test/red/runtime/nodes/resources/local/TestNodeModule/node_modules/TestNodeModule/package.json create mode 100644 test/red/runtime/nodes/resources/local/TestNodeModule/node_modules/VersionMismatchModule/TestNodeModule.html create mode 100644 test/red/runtime/nodes/resources/local/TestNodeModule/node_modules/VersionMismatchModule/TestNodeModule.js create mode 100644 test/red/runtime/nodes/resources/local/TestNodeModule/node_modules/VersionMismatchModule/TestNodeModule2.html create mode 100644 test/red/runtime/nodes/resources/local/TestNodeModule/node_modules/VersionMismatchModule/TestNodeModule2.js create mode 100644 test/red/runtime/nodes/resources/local/TestNodeModule/node_modules/VersionMismatchModule/icons/file.txt create mode 100644 test/red/runtime/nodes/resources/local/TestNodeModule/node_modules/VersionMismatchModule/package.json 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" + } + } +}