Socket
Socket
Sign inDemoInstall

coveralls

Package Overview
Dependencies
Maintainers
2
Versions
71
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

coveralls

takes json-cov output into stdin and POSTs to coveralls.io


Version published
Weekly downloads
330K
increased by1.31%
Maintainers
2
Weekly downloads
 
Created

What is coveralls?

The coveralls npm package is used to integrate your project with Coveralls, a web service that provides test coverage history and statistics. It helps developers ensure that their code is well-tested by tracking the percentage of code covered by tests over time.

What are coveralls's main functionalities?

Sending Coverage Reports

This feature allows you to send your test coverage reports to Coveralls. The code sample reads the coverage report from a file and sends it to Coveralls using the `handleInput` method.

const coveralls = require('coveralls');
const fs = require('fs');

fs.readFile('coverage/lcov.info', 'utf8', (err, data) => {
  if (err) {
    console.error('Error reading coverage file:', err);
    return;
  }
  coveralls.handleInput(data, (err) => {
    if (err) {
      console.error('Error sending to Coveralls:', err);
    } else {
      console.log('Coverage report sent to Coveralls');
    }
  });
});

Custom Git Information

This feature allows you to send custom Git information along with your coverage report. The code sample demonstrates how to include custom Git metadata when sending the coverage report to Coveralls.

const coveralls = require('coveralls');
const fs = require('fs');

const gitInfo = {
  head: {
    id: 'commit-sha',
    author_name: 'Author Name',
    author_email: 'author@example.com',
    committer_name: 'Committer Name',
    committer_email: 'committer@example.com',
    message: 'Commit message'
  },
  branch: 'main'
};

fs.readFile('coverage/lcov.info', 'utf8', (err, data) => {
  if (err) {
    console.error('Error reading coverage file:', err);
    return;
  }
  coveralls.handleInput(data, { git: gitInfo }, (err) => {
    if (err) {
      console.error('Error sending to Coveralls:', err);
    } else {
      console.log('Coverage report with custom git info sent to Coveralls');
    }
  });
});

Other packages similar to coveralls

Keywords

FAQs

Package last updated on 29 Jun 2021

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc