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

tap-arc

Package Overview
Dependencies
Maintainers
3
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tap-arc

spec-like TAP reporter

  • 1.0.0-RC.0
  • Source
  • npm
  • Socket score

Version published
Maintainers
3
Created
Source

tap-arc

A small (~25kB) TAP reporter with spec-like output, streaming, and failure diffing.

Objectives

  • minimal, informative spec-like output for all assertions
  • minimal, maintained dependencies
  • streaming in and out
  • helpful diffing for failures

tap-arc output screen shot

Installation & Usage

Compatible with Node.js 16+.

Save tap-arc as a development dependency:

npm i -D tap-arc

Simply pipe tap output to tap-arc.
Example npm test script:

// package.json
"scripts": {
  "test": "tape test/**/*.js | tap-arc"
}

💁 tap-arc will format output from any tap reporter. tape was used for testing.

tap-arc --help

Usage:
  tap-arc <options>

Parses TAP data from stdin, and outputs a "spec-like" formatted result.

Options:

  -v | --verbose
    Output full stack trace

  -p | --pessimistic | --bail
    Immediately exit upon encountering a failure
    example: tap-arc -p

  --no-color
    Output without ANSI escape sequences for colors
    example: tap-arc --no-color

Development

When building tap-arc, it's helpful to try various TAP outputs. See package.json "scripts" for useful "tap-arc.*" commands to test passing and failing TAP.

npm run tap-arc.simple # used to create the screen shot above

Tip!

Use

echo $?

to see previous exit code.

Tests

tap-arc is tested to output the correct exit code based on your test suite's TAP output. In the process, the boundaries of tap-arc's process are also tested by creating and parsing several types of TAP output.

Testing could be improved by unit testing the printer and diff maker.

Credit & Inspiration

  • tap-spec ol' reliable, but a bit stale and npm vulnerabilities
  • tap-difflet inspired output and diffing, also vulnerable
  • tap-min helpful approaches to streaming and exit codes

Keywords

FAQs

Package last updated on 12 Sep 2023

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