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

esnext-coverage-format-text

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

esnext-coverage-format-text

esnext-coverage output formatter to human-readable text

  • 0.0.6
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

esnext-coverage-format-text

NPM version Build Status

Code coverage reporter for esnext-coverage.

Similar to other coverage formatters, esnext-coverage-format-text accepts a coverage results object and produces a report as an utf8-encoded string.

Installation

npm install esnext-coverage-format-text --save-dev

Usage

Usage with test frameworks

Add esnext-coverage-format-text to the list of reporters in esnext-coverage configuration object or to your karma configuration file.

reporters: [
  {
    formatter: 'text', // require esnext-coverage-format-text
    outFile: 'reports/text-report.txt', // write output to file
    console: true // output to console
  }
]

Usage with esnext-coverage cli

esnext-coverage format coverage.json -f text -o report.txt

Usage in Node

import fs from 'fs';
import formatter from 'esnext-coverage-format-text';

fs.readFile('coverage.json', 'utf8', (err, data) => {
  const coverage = JSON.parse(data);
  const report = formatter(coverage);
  fs.writeFile('text-report.txt', report);
});

License

MIT License

Keywords

FAQs

Package last updated on 17 Apr 2017

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