1.0.3 • Published 10 months ago

qunit-assertions-extra v1.0.3

Weekly downloads
8,773
License
MIT
Repository
github
Last release
10 months ago

qunit-assertions-extra

A Collection of helpful assertions for use with qunit.

assert.contains('Hello there!', 'Hello');
assert.contains([1, 3], 3);

assert.matches('Hello there!', /Hello/);

Installation

yarn add --dev qunit-assertions-extra
npm install --save-dev qunit-assertions-extra

Then, wherever qunit tests are initialized, add

import 'qunit-assertions-extra';

This will also enable the tsserver to provide intellisense for assert.

Ember Projects

Requirements: ember-auto-import and add the above import to your tests/test-helper.js file.

Example:

import Application from '../app';
import config from '../config/environment';
import { setApplication } from '@ember/test-helpers';
import { start } from 'ember-qunit';

import 'qunit-assertions-extra';

setApplication(Application.create(config.APP));

start();

Contributing

See the Contributing guide for details.

Prior Art

  • qunit-dom much of the config for this repo was taken from qunit-dom.

License

This project is licensed under the MIT License.

1.0.2

10 months ago

1.0.1

10 months ago

1.0.3

10 months ago

1.0.0

1 year ago

0.8.5

4 years ago

0.8.4

4 years ago

0.8.1

4 years ago

0.8.0

4 years ago

0.7.0

4 years ago

0.6.0

4 years ago

0.5.0

4 years ago