This RFC proposes to officially deprecate
Consequently, this would also deprecate support for
generating test blueprints. Both
ember-data have logic to
determine the presence of
ember-mocha in order to use the appropriate test blueprints.
ember-mocha has been unmaintained for a while now. The last release was
published on Jun 16, 2019.
It also seems this release is not compatible with Ember v4.
Instead of letting
ember-mocha slowly fade away, it feels better to officially deprecate
it and clearly communicate this to the community.
- Having only
ember-qunit, saves developers the time and effort of having to make a choice between
- The Ember.js ecosystem can fully focus on building functionality around one testing framework
ember-mocha's README to state that
ember-mochais officially deprecated, and that users should consider migrating to
- Officially mark
ember-mochaas deprecated on the npm registry
- Update the test-framework detectors in
ember-datato deprecate support for
- Write a small guide that explains how to migrate from
Possible Migration Strategy
ember-qunit And Its Required Peer Dependencies
Required peer dependencies:
Please note that, at the time of writing,
ember-qunit also requires you to run
ember-source v3.28 or higher.
Please refer to the official
app blueprint for a complete setup of all these packages:
2. Migrate Your Tests One by One
Please refer to this commit for an exhaustive example on how to migrate your tests.
We also recommend using one of the following codemods, to speed up this process:
- mocha-to-qunit - The original Mocha to QUnit codemod
- mocha-to-qunit fork - Forked from
mocha-to-qunit, and used in the commit linked above
- ember-mocha-to-qunit-codemod - A more recently written Mocha to QUnit codemod
3. Clean up All References to Mocha
This includes (but not limited to):
- References and packages in your
- References in your
- References in custom test blueprints, if you have any
- References in documentation
We also recommend to install and use
eslint-plugin-qunitprovides useful ESLint rules for QUnit
qunit-domprovides high-level DOM assertions for QUnit
Though these packages aren't required to complete the migration, they will help you in writing better tests for QUnit. These packages are also part of the official
How We Teach This
ember-mocha should be removed from all learning materials, for example:
ember-mocha will have to migrate to using
at some point. This feels like a large migration to take on (depending on project size),
though I have no experience with this.
If there is any interest, we could also consider transferring
the Adopted Ember Addons organisation on GitHub?
None at the moment.