# tape-catch

> a wrapper around tape that catches and reports exceptions

Latest version **1.0.6** (published 2016-06-24) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: has types package; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.6 |
| Published | 2016-06-24 |
| First published | 2015-01-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/tape-catch) |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 37 |
| Author | Michael Rhodes |
| Maintainers | michaelrhodes |
| Keywords | tape, exception, catch |

## Links

- npm: https://www.npmjs.com/package/tape-catch
- Repository: https://github.com/michaelrhodes/tape-catch
- Issues: https://github.com/michaelrhodes/tape-catch/issues
- npm.io page: https://npm.io/package/tape-catch

## Dependencies (1)

- [global](https://npm.io/package/global.md) ~4.3.0

## Recent versions

- 1.0.6 (latest) — 2016-06-24
- 1.0.5 — 2016-04-24
- 1.0.4 — 2015-01-19
- 1.0.3 — 2015-01-16
- 1.0.2 — 2015-01-16
- 1.0.1 — 2015-01-15
- 1.0.0 — 2015-01-15

## README

# tape-catch
tape-catch is a wrapper around [tape](https://github.com/substack/tape) that reports uncaught errors in your tests. It re-adds functionality that was removed from tape in version 3.0.0.

[![Build status](https://travis-ci.org/michaelrhodes/tape-catch.png?branch=master)](https://travis-ci.org/michaelrhodes/tape-catch)

## install
```sh
$ npm install tape-catch
```
**note: tape is not installed alongside tape-catch.**

tape-catch works with any and all versions of tape, so it leaves this choice to the user.

## example
```js
var test = require('tape-catch')

test('cause an exception', function (assert) {
  asdf
})

test('still run this test', function (assert) {
  assert.equal(1 + 1, 2, 'this still ran')
  assert.end() 
})
```

```
TAP version 13
# cause an exception
not ok 1 ReferenceError: asdf is not defined
  ---
    operator: error
    expected: undefined
    actual:   {}
    stack:
      ReferenceError: asdf is not defined
        at Test.<anonymous> (/path/to/example.js:4:3)
        at Test.bound [as _cb] (/path/to/node_modules/tape/lib/test.js:59:32)
        at Test.exports.Test.run (/path/to/index.js:17:10)
        at Test.bound [as run] (/path/to/node_modules/tape/lib/test.js:59:32)
        at Object.next [as _onImmediate] (/path/to/node_modules/tape/lib/results.js:66:15)
        at processImmediate [as _immediateCallback] (timers.js:345:15)
  ...
# still run this test
ok 2 this still ran

1..2
# tests 2
# pass  1
# fail  1
```

## license
[MIT](http://opensource.org/licenses/MIT)

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