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 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();