-
-
Notifications
You must be signed in to change notification settings - Fork 405
RFC to collocate tests in in-repo-addons #378
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
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| - Start Date: 2018-09-05 | ||
| - RFC PR: (leave this empty) | ||
| - Ember Issue: (leave this empty) | ||
|
|
||
| # Collocate in-repo-addon tests | ||
|
|
||
| ## Summary | ||
|
|
||
| Locate tests that are associated with an in-repo-addon in that addon's tests folder. However, for this RFC, the output of the tests bundles will remain identical to the current output. | ||
|
|
||
| ## Motivation | ||
|
|
||
| Tests that are collocated next to their code in addons will be more discoverable and maintainable. | ||
|
|
||
| Having a simple syntax for executing tests associated with an addon is useful and time-saving. | ||
|
|
||
| ## Detailed design | ||
|
|
||
| - Indicate that an addon has tests that are collocated | ||
| - use `includeTestsInHost: true` in `index.js` to indicate collocated tests | ||
| - Implement CLI flag that only runs the tests for a specified addon | ||
| - `ember test --ir-addon foo-bar` | ||
| - The flag's use would create a list of tests to run that are collocated in that in-repo-addon's test folder. The tests will still be included all in one bundle, so this is basically just running the modules that are associated with the co-located tests. | ||
|
|
||
| ## Not covered in this RFC (but will be covered in a following RFC) | ||
| - Splitting the test bundles | ||
| - Tests should be separately bundled to allow running these tests without loading other tests. | ||
| - In very large application with many in-repo-addons, there is significant overhead in loading all of the application's tests, when only a single in-repo-addon's tests are being tested | ||
| - Expect another RFC coming soon to address this functionality | ||
| - Option to run addpn tests with dummy app | ||
| - Tests for an in-repo-addon/engine could be chosen to either run against the main app, or a (shared) dummy app. | ||
|
|
||
| ## How we teach this | ||
|
|
||
| - Create a guide chapter on in-repo-addons | ||
| - Add information about this feature to that chapter | ||
|
|
||
| ## Drawbacks | ||
|
|
||
| As the use of this feature would be completely optional by a user any drawbacks could be mitigated by not opting in. | ||
|
|
||
| ## Alternatives | ||
|
|
||
| - Use isDevelopingAddon to signal test inclusion | ||
|
|
||
| ## Unresolved questions | ||
|
|
||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Since all the test are included into a single bundle why do we need
--ir-addonflag? Build takes a while, building several--irtests may be annoying.What if we provide something like "Engines" or "Bundles" dropdown in qunit interface?