OpenFaaS Node.js with Mocha test
Example of how to unit-test an OpenFaaS function using the node12 template and Mocha.js
git clone https://github.com/alexellis/openfaas-node12-mocha-unit-test
cd openfaas-node12-mocha-unit-test
npm install
Test with:
faas-cli build
# or
cd unit-test && npm test