# tap-strings

> Generate valid TAP output as strings

Latest version **1.0.2** (published 2023-07-04) · WTFPL license · 0 weekly downloads

## Install

```sh
npm install tap-strings
pnpm add tap-strings
yarn add tap-strings
bun add tap-strings
```

## 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 | 1.0.2 |
| Published | 2023-07-04 |
| First published | 2017-05-20 |
| Weekly downloads | 0 |
| License | WTFPL |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 5.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | TehShrike |
| Maintainers | tehshrike |
| Keywords | tap, test, string, output |

## Links

- npm: https://www.npmjs.com/package/tap-strings
- Repository: https://github.com/TehShrike/tap-strings
- Homepage: https://github.com/TehShrike/tap-strings#readme
- Issues: https://github.com/TehShrike/tap-strings/issues
- npm.io page: https://npm.io/package/tap-strings

## 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
- [vest](https://npm.io/package/vest.md) — 50.1K weekly downloads
- [@ethereum-waffle/mock-contract](https://npm.io/package/@ethereum-waffle/mock-contract.md) — 40.0K weekly downloads

## Recent versions

- 1.0.2 (latest) — 2023-07-04
- 1.0.1 — 2017-10-13
- 1.0.0 — 2017-05-20

## README

# tap-strings

Generate valid TAP output as strings.


<!--js
const tap = require('./')
-->

# API

```
const tap = require('tap-strings')
```

## tap.version(number)

```js
tap.version(13) // => `TAP version 13`
```

## tap.plan(start, end)

```js
tap.plan(1, 5) // => `1..5`
```

## tap.test(ok, number, [description])

```js
tap.test(true, 1, `lookin' cool my man`) // => `ok 1 lookin' cool my man`
```

## tap.todo(ok, number, [descriptor, [directive]])

```js
const todoOutput = tap.todo(false, 2, `everything's groovy`, `Fix this later`)
todoOutput // => `not ok 2 everything's groovy # TODO Fix this later`
```

## tap.skip(ok, number, [descriptor, [directive]])

```js
tap.skip(true, 3, null, `Don't care`) // => `ok 3 # SKIP Don't care`
```

## tap.bail([message])

```js
tap.bail(`eek`) // => `Bail out! eek`
```

## tap.diagnostic([message])

```js
tap.diagnostic(`yo`) // => `# yo`
```

## tap.message(message)

```js
const messageOutput = tap.message(`This is totally
a multiline string`)

const expected = `  ---
  message: |-
    This is totally
    a multiline string
  ...`

messageOutput // => expected

```

# License

[WTFPL](http://wtfpl2.com)

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