Coding4fun node.js application to monitor aws, heroku and trigger a simple REST-API call, send an email or perform similar notification actions
Tested with node.js v5.1.0 Stable.
mocha 2.3.4
Install Dependencies
npm installStart Sample App
npm startStart Sample App and sample API using pm2 Production process manager for Node.js
npm run pm2-startnpm run pm2-start-apiTest
npm testCoverage
npm run test-covJSHint Lib
npm run jshint-libJSHint Tests
npm run jshint-tests###Build the Docker image and container
Build
Navigate to /docker path and run;
docker build -t watch-tower-test/monitor .Run
docker run -d -v $(pwd)/app:/app watch-tower-test/monitor###Used 3.Party Testing Modules
mocha
Simple, flexible, fun javascript test framework for node.js & the browser.
should
BDD style assertions for node.js.
sinon
Standalone test spies, stubs and mocks for JavaScript.
jshint
JSHint is a tool that helps to detect errors and potential problems in your JavaScript code.
istanbul
JS code coverage tool that computes statement, line, function and branch coverage with module loader hooks to transparently add coverage when running tests.
proxyquire
This package was used for just the system packages.
Proxies node.js require in order to allow overriding dependencies during testing.