# righto-tape

> [![Build Status](https://travis-ci.org/markwylde/righto-tape.svg?branch=master)](https://travis-ci.org/markwylde/righto-tape) ![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/markwylde/righto-tape) [![GitHub package.json vers

Latest version **1.1.0** (published 2020-05-21) · ISC license · 0 weekly downloads

## Install

```sh
npm install righto-tape
pnpm add righto-tape
yarn add righto-tape
bun add righto-tape
```

## 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.1.0 |
| Published | 2020-05-21 |
| First published | 2020-04-19 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | markwylde |

## Links

- npm: https://www.npmjs.com/package/righto-tape
- npm.io page: https://npm.io/package/righto-tape

## Dependencies (2)

- [tape](https://npm.io/package/tape.md) ^4.13.2
- [righto](https://npm.io/package/righto.md) ^6.0.1

## Recent versions

- 1.1.0 (latest) — 2020-05-21
- 1.0.4 — 2020-04-19
- 1.0.2 — 2020-04-19
- 1.0.0 — 2020-04-19

## README

# righto-tape
[![Build Status](https://travis-ci.org/markwylde/righto-tape.svg?branch=master)](https://travis-ci.org/markwylde/righto-tape)
![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/markwylde/righto-tape)
[![GitHub package.json version](https://img.shields.io/github/package-json/v/markwylde/righto-tape)](https://github.com/markwylde/righto-tape/blob/master/package.json)
[![GitHub](https://img.shields.io/github/license/markwylde/righto-tape)](https://github.com/markwylde/righto-tape/blob/master/LICENSE)
[![js-semistandard-style](https://img.shields.io/badge/code%20style-semistandard-brightgreen.svg?style=flat-square)](https://github.com/standard/semistandard)

A small wrapper around tape that allows passing a righto/generator into the test function

## Installation
```bash
npm install --save-dev righto-tape
```

## Usage
```javascript
const { promisify } = require('util');
const righto = require('righto');

const test = require('righto-tape');

const sleepCallback = (ms, callback) => setTimeout(callback, ms);
const sleepPromise = promisify(sleepCallback);

test('takes a promise', function * (t) {
  t.plan(1);

  yield sleepPromise(100);

  t.pass();
});

test('takes a righto', function * (t) {
  t.plan(1);

  yield righto(sleepCallback, 100);

  t.pass();
});

test('takes a normal function', function (t) {
  t.plan(1);

  sleepCallback(100, function () {
    t.pass();
  });
});
```

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