node-red-node-test-helper
                                
                                 node-red-node-test-helper copied to clipboard
                                
                                    node-red-node-test-helper copied to clipboard
                            
                            
                            
                        A test framework for Node-RED nodes
Originally raised in [node-red/3489](https://github.com/node-red/node-red/issues/3486) ## Current Behaviour I am looking at adding unit tests for the HTTP-In and HTTP-Response nodes (before I add a new feature). I have the bones...
I can't find a documentation how to init context while testing. Only what I found is this: https://discourse.nodered.org/t/how-can-i-access-global-context-in-tests/51820 which links to https://github.com/node-red/node-red/blob/master/test/nodes/core/function/15-change_spec.js#L31 So I'm trying to load Context to use...
Hi, I'm trying to switch my test suite to a parallel runner (AVA in this case) but there is some issues with sinon spies. Since this helper use a NodeRED...
To do based on comments from here: - Change code style / commit style - Documentation. I documented the API and added example files. I feel like duplicating all relevant...
Errors in function node code are swallowed and cause timeout error in test instead of fail the test. Since the tests are there to be able to help find and...
I use this module to write flow test as well. However, It takes long time to complete `redNodes.startFlows` in helper.load function when a flow file is big. I created a...
i tried out the [example](https://github.com/node-red/node-red-node-test-helper#synchronous-example-input) from the docs but my input handler is never called.
upPkg.packageJson.name changed to upPkg.pkg.name old: ``` const upPkg = readPkgUp.sync(); // case 1: we're in NR itself if (upPkg.packageJson.name === 'node-red') { ``` new: ``` const upPkg = readPkgUp.sync(); //...
- Allows flows to be create in editor and pasted into test scripts as JSON string. Backwards compatible with existing test flow definitions. - Automatically creates a flow to hold...
Essential documentation for people to really use this * How Receieve function works * How Emit function works * How to provide credentials for config nodes using load()