A young Ember Doctor. Currently I can only upgrade your QUnit test so you don't have to do it manually.
ember-watson
can be used as an ember CLI addon
, it will extend the
available list of commands.
To install, run npm install ember-watson --save-dev
and you are good
to go.
This command will transverse your tests directory fixing your QUnit test to use the 2.0 compatible output (see ember-cli#3197).
The following are some of the changes:
- Add
import { module, test } from 'qunit'
if ember-qunit is not used. You need to use ember-cli-qunit-v0.3.8 which includes QUnit's shims. See ember-cli#3245 - Import
skip
if used in tests:import { module,test, skip } from 'qunit'
- Add assert to callback function in
test
. - Use
assert
inside test, e.g.ok
becomesassert.ok
. - Use
beforeEach
andafterEach
instead ofsetup
andteardown
inside module.
Convert computed properties and observers to not use prototype
extensions. You can specify appPath
(defaults to app/
) in case you
want to convert code somewhere different to app/
.
For more info about this please refer to the following PR Encourage decorator-style Ember.computed/Ember.observer
ember-watson
can be used without ember CLI
too, just do npm install -g ember-watson
This command will transverse your tests directory fixing your QUnit test to use the 2.0 compatible output.
ember-watson is MIT Licensed.