New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

adana-format-text

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

adana-format-text

Generate a pretty output of Adana coverage data.

  • 0.1.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

adana-format-text

NPM version Build Status

Unit test coverage reporter for Adana.

Installation

npm install adana-format-text --save-dev

Usage

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

Usage with adana-cli

cat coverage.json | adana --format text > report.txt

Usage with karma-adana-reporter

Add adana-format-text to the list of formatters in adana configuration object of the karma configuration file.

formatters: [
  {
    type: 'text', // indicates usage of the "text" formatter
    save: 'reports/text-report.txt', // will write output to file
    show: true // will dump the same output to console
  }
]

Usage in Node

import fs from 'fs';
import adanaFormatText from 'adana-format-text';

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

Note that if you're using ES5, you will have to access the library via the default property due to the way exports are handled in Babel 6:

var adanaFormatText = require('adana-format-text').default;

License

MIT License

Keywords

FAQs

Package last updated on 02 Mar 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

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