# Using chai-qunit on top of ember-cli's ember-qunit?

**URL:** <https://discuss.emberjs.com/t/using-chai-qunit-on-top-of-ember-clis-ember-qunit/5832>\
**Category:** Testing\
**Created:** [July 6, 2014, 9:51pm UTC](https://discuss.emberjs.com/t/using-chai-qunit-on-top-of-ember-clis-ember-qunit/5832 "2014-07-06T21:51:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jyriand](https://avatars.discourse-cdn.com/v4/letter/j/3ec8ea/32.png) [@jyriand](https://discuss.emberjs.com/u/jyriand)\
**Post date:** [July 6, 2014, 9:51pm UTC](https://discuss.emberjs.com/t/using-chai-qunit-on-top-of-ember-clis-ember-qunit/5832/1 "2014-07-06T21:51:23Z")

</div>

I’m trying to do some testing for my ember-cli application. As I understand the default testing framework is qunit, but I would like to use [chai-qunit](https://github.com/fivetanley/chai-qunit) on top of it. Unfortunately I’m really new to javascript and ES6 modules and finding it quite impossible to understand how I should wire everything up to get chais assertions working in my tests.

First I did:

```
bower install --save-dev chai-qunit

```

and here I get lost. What should I do next. Do I need to get chai and chai-qunit into qunit’s html file?

```
<script type="text/javascript" src="/path/to/bower_components/chai/chai.js"></script>
<script type="text/javascript" src="/path/to/bower_components/chai-qunit/dist/main.js"></script>
<script>
     chaiQUnit.globalize();
</script>

```

or do I need to import in my test file:

```
import chai-qunit from 'chai-qunit';
chai-qunit.globalize();

```

---

<div class="post-metadata">

**Author:** ![lolmaus](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/lolmaus/32/15798_2.png) [@lolmaus](https://discuss.emberjs.com/u/lolmaus)\
**Post date:** [December 24, 2014, 11:39am UTC](https://discuss.emberjs.com/t/using-chai-qunit-on-top-of-ember-clis-ember-qunit/5832/2 "2014-12-24T11:39:55Z")

</div>

Did you resolve this? A am also searching how to integrate `chai-qunit` into Ember CLI.

---

<div class="post-metadata">

**Author:** ![rwjblue](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/rwjblue/32/9411_2.png) [@rwjblue](https://discuss.emberjs.com/u/rwjblue)\
**Post date:** [December 24, 2014, 2:16pm UTC](https://discuss.emberjs.com/t/using-chai-qunit-on-top-of-ember-clis-ember-qunit/5832/3 "2014-12-24T14:16:07Z")

</div>

ember-mocha is well supported and has feature parity with ember-qunit. There is also a nice ember-cli addon (ember-cli-mocha) that provides mocha + chai flavored blueprints.

---

<div class="post-metadata">

**Author:** ![lolmaus](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/lolmaus/32/15798_2.png) [@lolmaus](https://discuss.emberjs.com/u/lolmaus)\
**Post date:** [May 15, 2015, 12:33pm UTC](https://discuss.emberjs.com/t/using-chai-qunit-on-top-of-ember-clis-ember-qunit/5832/4 "2015-05-15T12:33:11Z")

</div>

Hey @rwjblue, i tried using `ember-cli-mocha` for a small Ember CLI addon and it turned out to be difficult to set up.

All I want is to use Chai assertions in Ember tests. I don’t want to go through the hassle of switching the whole testing suite.
