# tapout

> Tap output stream

Latest version **2.0.0** (published 2014-10-15) · ISC license · 0 weekly downloads

## Install

```sh
npm install tapout
pnpm add tapout
yarn add tapout
bun add tapout
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2014-10-15 |
| First published | 2014-05-13 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Sam Newman |
| Maintainers | sonewman |
| Keywords | tap, test anywhere protocol, test, stream |

## Links

- npm: https://www.npmjs.com/package/tapout
- Repository: git@github.com:sonewman/tapout
- Homepage: https://github.com/sonewman/tapout
- Issues: https://github.com/sonewman/tapout/issues
- npm.io page: https://npm.io/package/tapout

## Alternatives

- [duck](https://npm.io/package/duck.md) — 4.2M weekly downloads
- [ava](https://npm.io/package/ava.md) — 560.2K weekly downloads
- [storybook-addon-module-mock](https://npm.io/package/storybook-addon-module-mock.md) — 71.7K weekly downloads
- [@ethereum-waffle/mock-contract](https://npm.io/package/@ethereum-waffle/mock-contract.md) — 40.0K weekly downloads
- [aws-elasticsearch-connector](https://npm.io/package/aws-elasticsearch-connector.md) — 37.4K weekly downloads

## Recent versions

- 2.0.0 (latest) — 2014-10-15
- 1.2.0 — 2014-08-09
- 1.1.0 — 2014-05-24
- 1.0.0 — 2014-05-13

## README

# Tapout

Streaming Tap (Test Anywhere Protocol) output

Install:
```bash
$ npm i tapout
```

Give write spec objects to tapout and get streaming tap output.

A successful test object with two assertions:
```javascript
var TapOut = require('tapout')
var tap = new TapOut()

tap.pipe(process.stdout)

tap.write({
  name: 'my first test'
  , results: [
    { name: 'assert was correct', ok: true }
    , { name: 'assert was true', ok: true }
  ]
})

tap.end()
```
output:
```bash
$ node my-test.js
TAP version 13
# my first test
ok 1 assert was correct
ok 2 assert was true

1..2
# tests 2
# pass  2

# ok
```

```javascript
var TapOut = require('tapout')
var tap = new TapOut()
tap.pipe(process.stdout)

tap.end({
  name: 'my only failing test'
  , results: [
    {
      name: 'assert was correct'
      , ok: false
      , error: new Error()
      , file: 'my-file.js'
      , line: 20
      , column: 10
    }
  ]
})
```
output:
```bash
$ node my-failing-test.js
TAP version 13
# my only failing test
not ok 1 assert was correct
  ---
    file:   my-file.js
    line:   20
    column: 10
    stack:
      - repl:7:10
      - REPLServer.defaultEval (repl.js:130:27)
      - bound (domain.js:257:14)
      - REPLServer.runBound [as eval] (domain.js:270:12)
      - REPLServer.<anonymous> (repl.js:277:12)
      - REPLServer.EventEmitter.emit (events.js:107:17)
      - REPLServer.Interface._onLine (readline.js:202:10)
      - REPLServer.Interface._line (readline.js:531:8)
      - REPLServer.Interface._ttyWrite (readline.js:812:14)
      - ReadStream.onkeypress (readline.js:101:10)
  ...


1..1
# tests 1
# fail  1

# not ok
```

---
_Source: https://npm.io/package/tapout · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
