Instala las herramientas de testing:
npm install --save-dev mocha should istanbul
Crear los tests en /test:
describe ( 'When you run this application in AWS, you', function () {
it('should have set your region defined as AWS region', function () {
AWS.config.region.should.equal(awsRegion);
});
});
Ejecutar los tests:
mocha
Ejecutar la cobertura que te dan los tests:
istanbul cover node_modules/mocha/bin/_mocha -- -R spec