guardian/frontend — pull request #6977 by piuccio (2014-11-05 14:03:34+00:00)
Title: Measure code coverage

Running tests with `grunt coverage` reports the code coverage in the terminal and generates an html report for better understanding what’s left uncovered.

The syntax is the same as `grunt test`:
`grunt coverage:unit:facia` runs only the unit tests for `facia` package.

There's also the possibility of writing team city coverage report, but I'm not sure if we want that.

Out of curiosity
* common
```
=============================== Coverage summary ===============================
Statements : 49.1% ( 4843/9864 )
Branches : 33.27% ( 2150/6462 )
Functions : 54.52% ( 1092/2003 )
Lines : 61.92% ( 4451/7188 )
================================================================================
```

* facia
```
=============================== Coverage summary ===============================
Statements : 49.67% ( 2026/4079 )
Branches : 24.54% ( 703/2865 )
Functions : 51.04% ( 465/911 )
Lines : 50.48% ( 1990/3942 )
================================================================================
```

* membership
```
=============================== Coverage summary ===============================
Statements : 39.64% ( 1598/4031 )
Branches : 15.61% ( 454/2909 )
Functions : 39.43% ( 362/918 )
Lines : 41.71% ( 1532/3673 )
================================================================================
```