Skip to content

Instantly share code, notes, and snippets.

@JerrySievert
Created August 18, 2011 02:06
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JerrySievert/1153126 to your computer and use it in GitHub Desktop.
Save JerrySievert/1153126 to your computer and use it in GitHub Desktop.
coverage.json

coverage.json

Meta Data

Meta-data identifies the specifics of the coverage information, as well as the file versioning information.

{
  meta: {
    generator:       'vowsjs',
    generated:       'Fri Aug 05 2011 22:45:56 GMT-0700 (PDT)',
    instrumentation: 'node-jscoverage',
    'file-version':  '1.0',
    files: [
      'server.js',
      'client.js'
    ]
  }
}

Coverage Data

Coverage specifics. Data varies based on instrumentation.

{
  coverage: [
    {
      file:     'server.js',
      coverage: 97,
      hits:     97,
      misses:   3,
      sloc:     100,
      source:   {
        1: {
             line:     'var http = require("http");',
             coverage: 1
           },
        2: {
             line:     'for (var i = 0; i < 10; i++)',
             coverage: 10,
             fragments: [
               {
                 startcol: 0,
                 endcol:   2,
                 fragment: 'for',
                 coverage: 1
               },
               {
                 startcol: 3,
                 endcol:   4,
                 fragment: '(',
                 coverage: 1
               },
               [ ... ]
             ]
           },
        [ ... ]
      }
    },
    [ ... ]
  ]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment