Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

ember-cli-chai

ember-cli7.7kMIT0.5.0

Chai assertions for Ember.js

chai, ember-addon

readme

ember-cli-chai

npm Build Status

Chai assertions for Ember.js.

Installation

ember install ember-cli-chai

Usage

After installing ember-cli-chai you can import Chai from the chai package:

import chai from 'chai';

or import the expect() function directly:

import { expect } from 'chai';

Have a look at the vendor shim file to understand what else can be imported this way.

QUnit

Previous versions of ember-cli-chai supported QUnit but due to changes in chai itself this is unfortunately no longer viable. For readable DOM assertions in QUnit we recommend qunit-dom instead.

Chai plugins

ember-cli-chai is able to automatically load a number of popular Chai plugins:

All you have to do is install those plugins via npm install --save-dev. Once they are installed and listed as dependencies in your package.json file they will be used automatically.

Using chai-jquery for example will enable you to write JQuery assertions like:

expect(find('.test-element')).to.have.text('hello');

License

ember-cli-chai is licensed under the MIT License.

changelog

Changelog

v0.5.0 (2018-03-20)

:boom: Breaking Change

:bug: Bug Fix

:memo: Documentation

:house: Internal

Committers: 2

v0.4.3 (2017-10-02)

:rocket: Enhancement

Committers: 2

v0.4.2 (2017-06-12)

:rocket: Enhancement

:house: Internal

Committers: 1

v0.4.1 (2017-05-12)

:rocket: Enhancement

Committers: 1

v0.4.0 (2017-05-04)

:boom: Breaking Change

  • Updating ember-cli-babel to v6.x means increasing the supported minimum Node.js version to 4.x.

:rocket: Enhancement

:house: Internal

Committers: 1

v0.3.2 (2016-12-20)

:rocket: Enhancement

Committers: 1

v0.3.1 (2016-12-09)

:bug: Bug Fix

Committers: 1

v0.3.0 (2016-12-06)

:rocket: Enhancement

:bug: Bug Fix

  • #17 Update package.json to include qunit from 'addon' folder. (@polarctos)

:house: Internal

Committers: 3

v0.2.0 (2016-11-26)

:rocket: Enhancement

  • #7 Import "chai-jquery" and "chai-dom" automatically if available. (@Turbo87)
  • #6 Add QUnit integration. (@Turbo87)

Committers: 1