-
-
Notifications
You must be signed in to change notification settings - Fork 408
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Facilitate customization of setupTest* functions #637
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for writing this @kategengler! I am strongly in favor of this proposal.
Co-authored-by: Melanie Sumner <[email protected]>
Co-authored-by: Phil Gengler <[email protected]>
What would be an import path within addons? Is it an absolute path: import setupTest from 'dummy/tests/helpers'; Or relative: import setupTest from '../tests/helpers'; |
This is terrific. It seems plausible that addons could use this new convention to add their import { setupApplicationTest as upstreamSetupApplicationTest } from 'ember-qunit';
+ import { setupMirage } from 'ember-cli-mirage/test-support';
export function setupApplicationTest(hooks, options) {
upstreamSetupApplicationTest(hooks, options);
+ setupMirage(hooks);
// customize here
}
export { setupTest, setupRenderingTest } from 'ember-qunit'; |
Yes, exactly. |
It would be absolute. |
We discussed this in today's framework meeting and are moving it into Final Comment Period. |
Co-authored-by: Tobias Bieniek <[email protected]>
@kategengler This would be very useful! 💯 |
🎉 |
Are there any plans for implementing this? We adopted this format for our project about 6 months ago, but the burden of updating the imports for generated tests is beginning to get annoying. We're considering whether to just update our local blueprints or possibly chip in on the RFC implementation if it isn't too complex. |
As far as I know, this hasn't been started by anyone. I don't think the specific implementation is terribly difficult (though perhaps there is something we missed in the initial design), and I'd be happy to help guide you through the steps if you want to pick it up (just ping me in discord). |
@lougreenwood I have been working on this. The corresponding PRs are listed above. |
Fix code examples & add ember-cli release version in #637
* master: (56 commits) Fix code examples & add ember-cli release version in emberjs#637 Update FCP guidance to include Discord Update RFC 085421 ready-for-release PR URL Advance RFC {{ inputs.rfc-number }} to Stage ready-for-release feat: EmberData Cache v2.1 finalize lifetimes Update text/0860-ember-data-request-service.md Update RFC 496, typos, correct field name add note chore: update RequestService url with finalized design details Move emberjs#331 deprecate-globals-resolver to recommended Correct metadata for emberjs#487 custom model classes Move emberjs#625 helper-managers to recommended Add release date and version for 776 Update RFC 0776 released PR URL Advance RFC {{ inputs.rfc-number }} to Stage released Update RFC 0739 ready-for-release PR URL Advance RFC {{ inputs.rfc-number }} to Stage ready-for-release Deprecate `ember-mocha` Add title of RFC to advancement PR titles ...
Advance RFC #637 "Facilitate customization of setupTest* functions" to Stage Recommended
Rendered