Migrating from ember-cli-qunit to ember-cli-mocha
Sloppy bash script to migrate tests written with qunit to mocha.
# Status node --version && npm --version && bower --version && phantomjs --version # v6.3.1 # 3.10.3 # 1.7.9 # 2.1.1 ember --version # ember-cli: 2.6.3 # node: 6.3.1 # os: linux x64 ember test # tests 112, pass 112, skip 0, fail 0 # Install ember-cli-mocha ember install ember-cli-mocha # ? Overwrite tests/test-helper.js? (Yndh) Y rm -rf dist bower_components node_modules tmp npm install && bower install ember test # tests 108, pass 77, skip 0, fail 31 cd tests # Fix imports grep -rl "(assert)" | xargs sed -i "1s/^/import { assert } from 'chai';\n/"; grep -rl "'ember-qunit';" | xargs sed -i "s/'ember-qunit';/'ember-mocha';/g" sed -i "s/import { assert } from 'chai';//" test-helper.
[Read More]