tested-commits

0.5.5 • Public • Published

tested-commits v0.5.5

JavaScript code coverage split by commit

NPM

Build status dependencies devdependencies Codacy Badge

Read Code coverage by commit.

tested-commits - JavaScript code coverage split by commit
  version: 0.5.5
  author: "Gleb Bahmutov <gleb.bahmutov@gmail.com>"

Options:
  --version, -v  show version and exit                          [default: false]
  --repo         git repo path                                  [default: "."]
  --reset, -r    erase previously collected coverage            [default: false]
  --commits, -c  commit filter, for example pick last two -c 2  [default: 5]
  --update, -u   path to JSON coverage file to update with    
  --files, -f    filter input files expression                
  --open         open all current HTML reports

Selecting commits

You can pick commits to track coverage for using --commits option.

  • --commits <N> picks last N commits to look at
  • --commits <SHA-1> picks commit with full SHA id (40 hex characters)
  • --commits <short SHA-1> picks commit with short SHA id (7 hex characters), usually displayed when you call git log --oneline inside a repo.
  • --commits <part of the commit message> finds latest commit that contains exact message.

Selecting coverage

You can update current coverage from a file or url. Just make sure the coverage JSON was generated using istanbul. Some tools that use istanbul are Karma, gt and was-tested.

  • --update <path/to/cover.json> reads file from disk
  • --update <hostname/url/to/coverage> loads JSON file from given url

After loading the combined coverage information, each commit's data will be updated and saved again. Multiple updates keep incrementing the counters inside the individual commits.

Small print

Author: Gleb Bahmutov © 2014

License: MIT - do anything with the code, but don't blame me if it does not work.

Spread the word: tweet, star on github, etc.

Support: if you find any problems with this module, email / tweet / open issue on Github

MIT License

The MIT License (MIT)

Copyright (c) 2014 Gleb Bahmutov

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Package Sidebar

Install

npm i tested-commits

Weekly Downloads

10

Version

0.5.5

License

MIT

Last publish

Collaborators

  • bahmutov