# testdouble-qunit

> Verify testdouble stubs with QUnit

Latest version **3.0.3** (published 2021-11-29) · MIT license · 0 weekly downloads

## Install

```sh
npm install testdouble-qunit
pnpm add testdouble-qunit
yarn add testdouble-qunit
bun add testdouble-qunit
```

## Health

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

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.0.3 |
| Published | 2021-11-29 |
| First published | 2018-03-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 20.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Alex LaFroscia |
| Maintainers | alexlafroscia |
| Keywords | testdouble, qunit |

## Links

- npm: https://www.npmjs.com/package/testdouble-qunit
- Repository: https://github.com/alexlafroscia/testdouble-qunit/tree/master/packages/testdouble-qunit
- Homepage: https://alexlafroscia.github.io/testdouble-qunit
- npm.io page: https://npm.io/package/testdouble-qunit

## Recent versions

- 3.0.3 (latest) — 2021-11-29
- 2.0.0-beta.2 (next) — 2018-04-05
- 3.0.2 — 2021-11-29
- 3.0.1 — 2021-11-29
- 3.0.0 — 2021-02-08
- 2.1.1 — 2019-01-12
- 2.1.0 — 2019-01-12
- 2.0.2 — 2018-04-20
- 2.0.1 — 2018-04-20
- 2.0.0 — 2018-04-20
- 2.0.0-beta.1 — 2018-04-05
- 2.0.0-beta.0 — 2018-04-04
- 1.0.1 — 2018-03-28
- 1.0.0 — 2018-03-28
- 0.0.0 — 2018-03-28

## README

# testdouble-qunit

[![CI](https://github.com/alexlafroscia/testdouble-qunit/workflows/CI/badge.svg)](https://github.com/alexlafroscia/testdouble-qunit/actions?query=workflow%3ACI)

> Verify [`testdouble`][testdouble] stubs with [`QUnit`][qunit]

This library adds a `assert.verify` method to `QUnit` that allows you to verify that your stubs are called correctly.

```javascript
test('the stub is called', function(assert) {
  const stub = td.function();

  stub('foo');

  assert.verify(stub('foo'));
});
```

The signature of `assert.verify` is the same as `td.verify`.

## Installation

First, install the library. [`QUnit`][qunit] and [`testdouble`][testdouble] must also be installed.

```bash
yarn add -D testdouble-qunit
```

In your test set-up code, you need to extend `QUnit` with the added `verify` assertion. You can do so with the following code snippet:

```javascript
import QUnit from 'qunit';
import td from 'testdouble';
import installVerifyAssertion from 'testdouble-qunit';

installVerifyAssertion(QUnit, td);
```

If you are using this package with Ember.js, you should put this in your `tests/test-helper.js` file

[testdouble]: https://github.com/testdouble/testdouble.js/
[qunit]: https://qunitjs.com

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