mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Add missing registry test resources
This commit is contained in:
parent
79e9641c09
commit
882b593ba4
@ -0,0 +1,3 @@
|
|||||||
|
<script type="text/x-red" data-template-name="test-node-1"></script>
|
||||||
|
<script type="text/x-red" data-help-name="test-node-1"></script>
|
||||||
|
<script type="text/javascript">RED.nodes.registerType('test-node-1',{});</script>
|
5
test/red/nodes/resources/DuplicateTestNode/TestNode1.js
Normal file
5
test/red/nodes/resources/DuplicateTestNode/TestNode1.js
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
// A test node that exports a function
|
||||||
|
module.exports = function(RED) {
|
||||||
|
function DuplicateTestNode(n) {}
|
||||||
|
RED.nodes.registerType("test-node-1",DuplicateTestNode);
|
||||||
|
}
|
@ -0,0 +1,6 @@
|
|||||||
|
<script type="text/x-red" data-template-name="test-node-multiple-1a"></script>
|
||||||
|
<script type="text/x-red" data-help-name="test-node-multiple-1a"></script>
|
||||||
|
<script type="text/javascript">RED.nodes.registerType('test-node-multiple-1a',{});</script>
|
||||||
|
<script type="text/x-red" data-template-name="test-node-multiple-1b"></script>
|
||||||
|
<script type="text/x-red" data-help-name="test-node-multiple-1b"></script>
|
||||||
|
<script type="text/javascript">RED.nodes.registerType('test-node-multiple-1b',{});</script>
|
@ -0,0 +1,7 @@
|
|||||||
|
// A test node that exports a function
|
||||||
|
module.exports = function(RED) {
|
||||||
|
function TestNode1(n) {}
|
||||||
|
RED.nodes.registerType("test-node-multiple-1a",TestNode1);
|
||||||
|
function TestNode2(n) {}
|
||||||
|
RED.nodes.registerType("test-node-multiple-1b",TestNode2);
|
||||||
|
}
|
@ -0,0 +1,4 @@
|
|||||||
|
<script type="text/x-red" data-template-name="nested-node-1"></script>
|
||||||
|
<script type="text/x-red" data-help-name="nested-node-1"></script>
|
||||||
|
<script type="text/javascript">RED.nodes.registerType('nested-node-1',{});</script>
|
||||||
|
<style></style>
|
@ -0,0 +1,5 @@
|
|||||||
|
// A test node that exports a function
|
||||||
|
module.exports = function(RED) {
|
||||||
|
function TestNode(n) {}
|
||||||
|
RED.nodes.registerType("nested-node-1",TestNode);
|
||||||
|
}
|
4
test/red/nodes/resources/TestNode1/TestNode1.html
Normal file
4
test/red/nodes/resources/TestNode1/TestNode1.html
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
<script type="text/x-red" data-template-name="test-node-1"></script>
|
||||||
|
<script type="text/x-red" data-help-name="test-node-1"></script>
|
||||||
|
<script type="text/javascript">RED.nodes.registerType('test-node-1',{});</script>
|
||||||
|
<style></style>
|
5
test/red/nodes/resources/TestNode1/TestNode1.js
Normal file
5
test/red/nodes/resources/TestNode1/TestNode1.js
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
// A test node that exports a function
|
||||||
|
module.exports = function(RED) {
|
||||||
|
function TestNode(n) {}
|
||||||
|
RED.nodes.registerType("test-node-1",TestNode);
|
||||||
|
}
|
4
test/red/nodes/resources/TestNode2/TestNode2.html
Normal file
4
test/red/nodes/resources/TestNode2/TestNode2.html
Normal file
@ -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>
|
10
test/red/nodes/resources/TestNode2/TestNode2.js
Normal file
10
test/red/nodes/resources/TestNode2/TestNode2.js
Normal file
@ -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();
|
||||||
|
});
|
||||||
|
}
|
3
test/red/nodes/resources/TestNode3/TestNode3.html
Normal file
3
test/red/nodes/resources/TestNode3/TestNode3.html
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
<script type="text/x-red" data-template-name="test-node-3"></script>
|
||||||
|
<script type="text/x-red" data-help-name="test-node-3"></script>
|
||||||
|
<script type="text/javascript">RED.nodes.registerType('test-node-3',{});</script>
|
8
test/red/nodes/resources/TestNode3/TestNode3.js
Normal file
8
test/red/nodes/resources/TestNode3/TestNode3.js
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
// A test node that exports a function which returns a rejecting promise
|
||||||
|
|
||||||
|
var when = require("when");
|
||||||
|
module.exports = function(RED) {
|
||||||
|
return when.promise(function(resolve,reject) {
|
||||||
|
reject("fail");
|
||||||
|
});
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user