From c0b0c6f41672986c66a4c9e729b97f1ceae9121c Mon Sep 17 00:00:00 2001 From: kingcody Date: Sat, 30 Aug 2014 14:49:38 -0400 Subject: [PATCH] docs(server-tests): update readme.md for new `test:coverage` task Changes: - add documentation for `grunt test:coverage` --- readme.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/readme.md b/readme.md index da6a851d1..a9997f528 100644 --- a/readme.md +++ b/readme.md @@ -338,6 +338,19 @@ To setup protractor e2e tests, you must first run Use `grunt test:e2e` to have protractor go through tests located in the `e2e` folder. +**Code Coverage** + +Use `grunt test:coverage` to run mocha-istanbul and generate code coverage reports. + +`coverage/server` will be populated with `e2e` and `unit` folders containing the `lcov` reports. + +The coverage taget has 3 available options: +- `test:coverage:unit` generate server unit test coverage +- `test:coverage:e2e` generate server e2e test coverage +- `test:coverage:check` combine the coverage reports and check against predefined thresholds + +* *when no option is given `test:coverage` runs all options in the above order* + ## Environment Variables Keeping your app secrets and other sensitive information in source control isn't a good idea. To have grunt launch your app with specific environment variables, add them to the git ignored environment config file: `server/config/local.env.js`.