node-red-node-test-helper
node-red-node-test-helper copied to clipboard
dependencies / scope
This module should supply a test harness only. It should have examples showing how to use this with test frameworks (e.g. Mocha). A user which wants to test their own flow can install whichever test framework(s( they want to use, and simply consume the helper function(s) as needed.
Thus, any modules which run this helper's tests (if there are any) should be in devDependencies.
I think this should reduce the actual dependencies to perhaps only express. Node.js v4 has Promise support, so when can also be removed.
The helper currently uses sinon, should, supertest in the helper itself, so will need changes to the code before we can drop those dependencies.
when is used since NR uses it. We implement a flow storage plugin to return the test flow. It's possible that the runtime may depend on having a when promise? (not sure), but don't want to break core tests that may eventually use this code.
Can definitely move mocha to devDependencies right away, and agree we should move the nodes and example tests to examples.