summaryrefslogtreecommitdiffstats
path: root/dgbuilder/test/red/nodes/resources/TestNode2
diff options
context:
space:
mode:
Diffstat (limited to 'dgbuilder/test/red/nodes/resources/TestNode2')
-rw-r--r--dgbuilder/test/red/nodes/resources/TestNode2/TestNode2.html4
-rw-r--r--dgbuilder/test/red/nodes/resources/TestNode2/TestNode2.js10
2 files changed, 14 insertions, 0 deletions
diff --git a/dgbuilder/test/red/nodes/resources/TestNode2/TestNode2.html b/dgbuilder/test/red/nodes/resources/TestNode2/TestNode2.html
new file mode 100644
index 00000000..66b65909
--- /dev/null
+++ b/dgbuilder/test/red/nodes/resources/TestNode2/TestNode2.html
@@ -0,0 +1,4 @@
+<script type="text/x-red" data-template-name="test-node-2"></script>
+<script type="text/x-red" data-help-name="test-node-2"></script>
+<script type="text/javascript">RED.nodes.registerType('test-node-2',{});</script>
+<style></style>
diff --git a/dgbuilder/test/red/nodes/resources/TestNode2/TestNode2.js b/dgbuilder/test/red/nodes/resources/TestNode2/TestNode2.js
new file mode 100644
index 00000000..faf61a8f
--- /dev/null
+++ b/dgbuilder/test/red/nodes/resources/TestNode2/TestNode2.js
@@ -0,0 +1,10 @@
+// A test node that exports a function which returns a resolving promise
+
+var when = require("when");
+module.exports = function(RED) {
+ return when.promise(function(resolve,reject) {
+ function TestNode(n) {}
+ RED.nodes.registerType("test-node-2",TestNode);
+ resolve();
+ });
+}