I'm developing a node-red node, and I'd like to know the best or intended way to test those nodes. I've been looking at some other nodes, and they look to depend on a peer installation of node-red itself and use the "helper.js" to load those nodes. I was expecting to have a more "unit-level" testing perhaps mocking the node-red.
How to properly test node-red nodes?
Asked Answered
You'll do much better asking this on the Node-RED mailing list (groups.google.com/forum/#!forum/node-red) than here. –
Submicroscopic
The debug node in the node red help you to test your functionality and data at each node.please check with node –
Inculpable
If you look at the way that the core nodes are tested, this should give you some ideas.
There is also an effort underway to extract the test harness from core and make it available for everyone. You should also check out the Node-RED WIKI which contains some information on testing.
In general, it looks like you will need to run your node in an embedded version of Node-RED. Running NR using your chosen test tool.
© 2022 - 2024 — McMap. All rights reserved.