From b360f47540f3443b017ca97f2dc20267ae01ffc6 Mon Sep 17 00:00:00 2001 From: Derek Boytim Date: Tue, 23 Jan 2018 12:03:28 -0500 Subject: [PATCH] Add example testCredentials object since the format is not easily understood using the link. --- Testing.md | 11 +++++++++++ 1 file changed, 11 insertions(+) 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`.