Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@vitest/coverage-c8

Package Overview
Dependencies
Maintainers
3
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vitest/coverage-c8

C8 coverage provider for Vitest

  • 0.26.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
106K
decreased by-42.73%
Maintainers
3
Weekly downloads
 
Created

What is @vitest/coverage-c8?

@vitest/coverage-c8 is an npm package that integrates with Vitest to provide code coverage reporting using the c8 library. It helps developers measure how much of their code is being tested, ensuring that their tests cover the necessary parts of their application.

What are @vitest/coverage-c8's main functionalities?

Basic Coverage Reporting

This configuration enables basic coverage reporting using c8. It specifies the coverage provider as 'c8' and sets up multiple reporters to output coverage data in text, JSON, and HTML formats.

module.exports = {
  coverage: {
    provider: 'c8',
    reporter: ['text', 'json', 'html'],
  },
};

Custom Coverage Directory

This configuration allows you to specify a custom directory for storing coverage reports. By setting the 'reportsDirectory' option, you can control where the coverage data is saved.

module.exports = {
  coverage: {
    provider: 'c8',
    reporter: ['text', 'json', 'html'],
    reportsDirectory: './custom-coverage',
  },
};

Excluding Files from Coverage

This configuration demonstrates how to exclude certain files or directories from coverage reporting. The 'exclude' option takes an array of glob patterns to specify which files should be ignored.

module.exports = {
  coverage: {
    provider: 'c8',
    reporter: ['text', 'json', 'html'],
    exclude: ['**/node_modules/**', '**/test/**'],
  },
};

Other packages similar to @vitest/coverage-c8

Keywords

FAQs

Package last updated on 21 Dec 2022

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