You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#15933 updated the blueprints for Qunit to reflect the changes made in RFC 232 and RFC 268. As of ember-mocha 0.14.0 we can implement these same blueprints for Mocha tests as well.
The desired behavior when generating testing blueprints is to generate "Simplified Mocha" style tests if supported by the host app. We have several tasks below to extend the blueprints to support the "Simplified Mocha" style blueprints alongside the legacy, and ember-mocha blueprints.
Tasks
Add RFC 232 variant detector for mocha & component blueprints #16865 (🔒 @Dhaulagiri) Extend test-framework-detector.js to support a directory called mocha-rfc-232-files which will be where the "Simplified Mocha" blueprints will live in each of the blueprint test folders (e.g blueprints/component-test/mocha-rfc-232-files/). The decision to use the mocha-rfc-232-files directory should be based on the host's ember-mocha version
An ember-mocha with the newer APIs hadn’t landed at that point (the repo needed more work before it was ready). I think at this point the best path is to make a quest style issue with a checklist and guidance. Generally speaking these efforts move forward fairly quickly.
I personally would love to see updated blueprints land in time for 3.4 (current beta).
@rwjblue I copied over the quest items from the qunit issue here to turn this into a quest for updating the mocha blueprints. Let me know if this plan seems sound (I'm a little out of the loop).
I'll probably need help with the initializer tests as they seem to differ from qunit in ways that I can't quite understand the "right" way to write them
Sorry for the delays here, I was on vacation and am only finally getting caught back up. I merged the ones that seemed ready, and commented on some of the others (needing a rebase / restarting CI for flakyness / etc).
I'll probably need help with the initializer tests as they seem to differ from qunit in ways that I can't quite understand the "right" way to write them
I am interested in wrapping this up. @Dhaulagiri can you elaborate on this? How/why would the Mocha tests have to differ?
@simonihmig i wish I had been more specific here, but if I recall correctly if I tried to mimic the same application test setup as the qunit tests I was running into unexpected errors in the mocha tests.
Activity
rwjblue commentedon Aug 4, 2018
An ember-mocha with the newer APIs hadn’t landed at that point (the repo needed more work before it was ready). I think at this point the best path is to make a quest style issue with a checklist and guidance. Generally speaking these efforts move forward fairly quickly.
I personally would love to see updated blueprints land in time for 3.4 (current beta).
[-]No RFC 232/268 blueprints for Mocha test suites?[/-][+][Quest] Mocha Blueprints for RFCs 232/268[/+]Dhaulagiri commentedon Aug 4, 2018
@rwjblue I copied over the quest items from the qunit issue here to turn this into a quest for updating the mocha blueprints. Let me know if this plan seems sound (I'm a little out of the loop).
shadi4778 commentedon Aug 17, 2018
issue
Dhaulagiri commentedon Sep 4, 2018
I'll probably need help with the initializer tests as they seem to differ from qunit in ways that I can't quite understand the "right" way to write them
rwjblue commentedon Sep 4, 2018
Sorry for the delays here, I was on vacation and am only finally getting caught back up. I merged the ones that seemed ready, and commented on some of the others (needing a rebase / restarting CI for flakyness / etc).
simonihmig commentedon Dec 3, 2018
I am interested in wrapping this up. @Dhaulagiri can you elaborate on this? How/why would the Mocha tests have to differ?
Dhaulagiri commentedon Dec 3, 2018
@simonihmig i wish I had been more specific here, but if I recall correctly if I tried to mimic the same application test setup as the qunit tests I was running into unexpected errors in the mocha tests.
[Feature] Update initializer blueprint for ember-mocha 0.14
[Feature] Update instance-initializer blueprint for ember-mocha 0.14
simonihmig commentedon Dec 26, 2018
Here are two PRs for the missing (instance-) initializer blueprints: #17411, #17412
[Feature] Update instance-initializer blueprint for ember-mocha 0.14
[Feature] Update initializer blueprint for ember-mocha 0.14
[Feature] Update initializer blueprint for ember-mocha 0.14
[Feature] Update instance-initializer blueprint for ember-mocha 0.14
simonihmig commentedon Mar 16, 2019
With the above two PRs being merged, the remaining points can be checked off and this issue closed! 🎉
Dhaulagiri commentedon Mar 18, 2019
Thanks!!!