See below about basic design of ia-cloud Node-RED custom nodes. https://github.com/ia-cloud/Web-API-Specification-V2/blob/master/ia-cloud%20custom%20nodes.md
Install mocha.
npm i -g mochaExecute test script
npm testor
npm test:watch