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

karma-tap-pretty-reporter

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

karma-tap-pretty-reporter

a Karma TAP Reporter and Prettifier

  • 4.1.0
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

karma-tap-pretty-reporter

npm version npm downloads Build Status Windows Tests bitHound Overall Score Donate

a Karma reporter plugin for report and prettify TAP test results

Installation

npm

npm install karma karma-tap karma-tap-pretty-reporter --save-dev

[optional] install a prettify package. See below supported prettifiers

npm install faucet --save-dev

Usage

Add karma.conf.js file to project.

Example:

// karma.conf.js
module.exports = function(config) {
  config.set({
    reporters: ['tap-pretty'],

    tapReporter: {
      prettify: require('faucet'), // default 'standard TAP' output
      separator: '****************************'
    },
  });
};

Using separator

On Karma autoWatch mode maybe we need separate test run cycles output. Create a separator string for this purpose.

In order of not pollute output, separator will be shown only if LogLevel is different of LOG_INFO nor LOG_DEBUG

Report to a file

Optionally you can save report to a file and turn off output to the console.

// karma.conf.js

reporters: ['tap-pretty'],

tapReporter: {
  outputFile: './test.out.tap',
  disableStdout: true            // default 'false'
},

Supported prettifiers

Use Cases

Show only 'failed' test

Install tap-difflet package

npm install tap-difflet --save-dev

Add settings to tapReporter on karma.conf.js

tapReporter: {
      // outputFile: './unit.tap',
      prettify: function() { return require('tap-difflet')({ pessimistic: true }); },
      separator: '****************************',
    },

Example

Credits

author

contributors

Contributing

  • Documentation improvement
  • Feel free to send any PR

License

ISC

Keywords

FAQs

Package last updated on 04 Jun 2018

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