We need to implement changes in blueprints and docs realted to RFC 232 and RFC 268. (Some background for those unfamiliar http://rwjblue.com/2017/10/23/ember-qunit-simplication/)
As of ember-cli-qunit@^4.1.1
(which is in the default blueprint as of ember-cli@2.17
), we can implement the "Simplified QUnit" style tests in all tests except for acceptance tests.
In a future release of ember-qunit
(likely 3.2.x), we will be able to leverage the implementation of setupApplicationTest
from RFC 268 for use in acceptance-tests. Once these changes are implemented upstream, we must implement the blueprint updates.
Currently, we have no way to generate these test files but we can run the ember-qunit-codemod
to migrate test files and continue to iterate on the final output in the blueprint specific pull requests.
The desired behavior when generating testing blueprints is to, generate "Simplified QUnit" style tests if supported by the host app.
We have several tasks below to extend the blueprints to support the "Simplified QUnit" style blueprints alongside the legacy, and ember-mocha blueprints.
We can likely add to the behavior of test-framework-detector.js
to support this other extension. Once these changes are completed we also need to update the guides to be consistent with the current ember-cli
codebase.
We should work with @rwjblue and the learning team (cc @locks) to determine how we best teach this.
Tasks
- Extend
test-framework-detector.js
to support a directory calledqunit-rfc-232-files
which will be where the "Simplified QUnit" blueprints will live in each of the blueprint test folders (e.gblueprints/component-test/qunit-rfc-232-files/
). The decision to use thequnit-rfc-232-files
directory should be based on the host'sember-cli-qunit
- Add
<type>-test
"simplified QUnit" blueprints- acceptance-test * (Not yet implemented, updates are being worked on by @rwjblue in
ember-test-helpers
, we cannot add these blueprints until the RFC 268 implementation is finished) - component-test
- controller-test
- helper-test
- initializer-test
- instance-initializer-test
- mixin-test
- route-test
- service-test
- util-test
- acceptance-test * (Not yet implemented, updates are being worked on by @rwjblue in
- Extract the above tests blueprints into a standalone polyfill addon https://github.com/alexander-alvarez/ember-qunit-nested-module-blueprints-polyfill so developers can access the new testing blueprints regardless of what version of
ember-cli
they are on (so long as they are runningember-cli-qunit@^4.1.1
) - Update testing section in https://github.com/emberjs/guides to reflect new style (note this should land very close to when the changes above are implemented)
Lets change this to
qunit-rfc-232-files
?I believe its actually
ember-cli@2.17
What about adding a snippet to the end like: