Skip to content

Commit c5f31fb

Browse files
committed
Merge pull request #506 from kingcody/docs/update-testing
docs(server-tests): update readme.md for new `test:coverage` task
2 parents 42b2404 + c0b0c6f commit c5f31fb

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
@@ -339,6 +339,19 @@ To setup protractor e2e tests, you must first run
339339

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

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

344357
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)