Skip to content

Commit c0b0c6f

Browse files
committed
docs(server-tests): update readme.md for new test:coverage task
Changes: - add documentation for `grunt test:coverage`
1 parent 4babb07 commit c0b0c6f

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

Diff for: readme.md

+13
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,19 @@ To setup protractor e2e tests, you must first run
338338

339339
Use `grunt test:e2e` to have protractor go through tests located in the `e2e` folder.
340340

341+
**Code Coverage**
342+
343+
Use `grunt test:coverage` to run mocha-istanbul and generate code coverage reports.
344+
345+
`coverage/server` will be populated with `e2e` and `unit` folders containing the `lcov` reports.
346+
347+
The coverage taget has 3 available options:
348+
- `test:coverage:unit` generate server unit test coverage
349+
- `test:coverage:e2e` generate server e2e test coverage
350+
- `test:coverage:check` combine the coverage reports and check against predefined thresholds
351+
352+
* *when no option is given `test:coverage` runs all options in the above order*
353+
341354
## Environment Variables
342355

343356
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`.

0 commit comments

Comments
 (0)