Skip to content
Chai assertions for Ember.js
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
config Update "ember-cli" to v2.12.3 Jun 12, 2017
rollup
tests
vendor
.editorconfig
.ember-cli Initial Commit from Ember CLI v0.1.12 Feb 16, 2015
.eslintrc.js
.github_changelog_generator
.gitignore
.npmignore
.travis.yml CI: Remove obsolete `phantomjs-prebuilt` install step Dec 21, 2018
.watchmanconfig Update "ember-cli" to v2.9.1 Nov 24, 2016
CHANGELOG.md
LICENSE.md Update LICENSE file Nov 26, 2016
README.md
ember-cli-build.js
index.js Update `babel-preset-env` to v7.1.0 and new package name Sep 24, 2018
package.json Build(deps): Bump resolve from 1.10.1 to 1.11.0 May 16, 2019
testem.js
yarn.lock Build(deps): Bump resolve from 1.10.1 to 1.11.0 May 16, 2019

README.md

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.

You can’t perform that action at this time.