diff --git a/Testing.md b/Testing.md index 190cc9a..76f6894 100644 --- a/Testing.md +++ b/Testing.md @@ -67,6 +67,17 @@ Helper script can start Node-RED server, load a flow, and receive a payload from - `testNode`: (object|array of objects) Module object of a node to be tested returned by require function. This node will be registered, and can be used in `testFlows`. - `testFlows`: (array of objects) [Flow data](https://github.com/node-red/node-red/wiki/Flow-Format) to test a node. If you want to use the flow data exported from Node-RED editor, need to covert it to JavaScript object using JSON.parse(). - `testCredentials`: (object) [Node credentials](https://nodered.org/docs/creating-nodes/credentials). This argument is optional. + +Example `testCredentials` for node "n1": +``` + { + n1: { + user: "user", + password: "password" + } + } +``` + - `cb`: (function) Function to call back when testFlows has been started. The minimum script to test a flow is as follows. This case omits `testCredentials`.