Skip to content
This repository has been archived by the owner on Feb 25, 2019. It is now read-only.

adding basic coverage for istanbul #270

Merged
merged 1 commit into from
Oct 18, 2015

Conversation

henrjk
Copy link
Contributor

@henrjk henrjk commented Oct 18, 2015

No description provided.

@christiansmith
Copy link
Member

Looks good! Thanks!

christiansmith added a commit that referenced this pull request Oct 18, 2015
adding basic coverage for istanbul
@christiansmith christiansmith merged commit bbac317 into anvilresearch:master Oct 18, 2015
@henrjk
Copy link
Contributor Author

henrjk commented Oct 19, 2015

The coverage.sh script collects coverage data running the tests as follows:

  1. in coverage/integration/ running the integration tests.
  2. in coverage/unit/ running the unit tests.

The scripts then combines these reports and save the totals in coverage/.
All coverage reports can be viewed in the browser. For example on OS X like this:

open coverage/lcov-report/index.html

Here is an example of an invocation in the master branch:

dev$ ./coverage.sh 

19:27:51 access: GET /v1/clients 400 13ms
  ․․․19:27:51 access: GET /v1/clients 200 4ms
... many lines removed...
  228 passing (2s)
  6 pending

=============================================================================
Writing coverage object [/Users/dev/code/work/connect2/coverage/integration/coverage.json]
Writing coverage reports at [/Users/dev/code/work/connect2/coverage/integration]
=============================================================================

=============================== Coverage summary ===============================
Statements   : 47.12% ( 1122/2381 )
Branches     : 19.2% ( 217/1130 )
Functions    : 36.52% ( 153/419 )
Lines        : 48.81% ( 1090/2233 )
================================================================================


  ․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․
  ․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․
  ․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․
  ․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․
  ․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․
  ․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․
  ․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․
  ․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․
  ․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․
  ․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․
  ․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․
  ․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․
  ․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․
  ․․․․․․․․․․․․․․․․․

  971 passing (8s)
  21 pending

=============================================================================
Writing coverage object [/Users/dev/code/work/connect2/coverage/unit/coverage.json]
Writing coverage reports at [/Users/dev/code/work/connect2/coverage/unit]
=============================================================================

=============================== Coverage summary ===============================
Statements   : 81.74% ( 1647/2015 )
Branches     : 71% ( 727/1024 )
Functions    : 77.59% ( 225/290 )
Lines        : 84.35% ( 1633/1936 )
================================================================================
Done

@christiansmith
Copy link
Member

@henrjk thanks for adding some context to this for posterity. Work is in progress on #272 submitted by @vsimonian to wrap this in an npm command.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants