3.0.3 • Published 2 years ago

testdouble-qunit v3.0.3

Weekly downloads
261
License
MIT
Repository
github
Last release
2 years ago

testdouble-qunit

CI

Verify testdouble stubs with QUnit

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

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 and testdouble must also be installed.

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:

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

3.0.3

2 years ago

3.0.2

2 years ago

3.0.1

2 years ago

3.0.0

3 years ago

2.1.1

5 years ago

2.1.0

5 years ago

2.0.2

6 years ago

2.0.1

6 years ago

2.0.0

6 years ago

2.0.0-beta.2

6 years ago

2.0.0-beta.1

6 years ago

2.0.0-beta.0

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago

0.0.0

6 years ago