🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

fetch-coverage

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fetch-coverage

Fetch the coverage % from an open-source GIT repository, using a variety of common coverage services.

1.0.2
Source
npm
Version published
Weekly downloads
11
-70.27%
Maintainers
1
Weekly downloads
 
Created
Source

fetch-coverage

NPM version Downloads Build Status Coverage Status Dependency status Dev Dependency status

Fetch the coverage % from an open-source GIT repository, using a variety of common coverage services.

Currently supports GitHub, Bitbucket and GitLab repositories and checks against Coveralls, Code Climate, Scrutinizer and Codecov.

Installation

$ npm install fetch-coverage

Usage

fetchCoverage(repositoryUrl, options) -> Promise

const fetchCoverage = require('fetch-coverage');

fetchCoverage('git@github.com:IndigoUnited/node-planify.git')
.then((coverage) => console.log('Coverage', coverage));  // Coverage between 0 and 1

The repositoryUrl is any valid cloneable URL.

Available options:

  • branch: The target branch (only supported in some services)
  • services: The services to fetch from, defaults to all services
  • got: Custom options to be passed to got, defaults to { timeout: 15000 }
  • badges: The badges information gathered by detect-readme-badges which might speed up the coverage fetching

Tests

$ npm test
$ npm test-cov to get coverage report

License

Released under the MIT License.

Keywords

coverage

FAQs

Package last updated on 14 Sep 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts