Closed keithkelly31 closed 5 years ago
@keithkelly this has been brought up in https://github.com/emberjs/rfcs/pull/124 Might want to look at what they're talking about and add your reaction or ideas as this is a part of the proposal.
tests in pods, and then being able to run only tests from a pod or two, seems like a great idea.
Tests in "pods" makes sense, and there really isn't anything preventing us from doing something like that right now: ember test "module/name/*/glob/**/regex/maybe?"
which would run a build and filter tests to be included (getting clever about module/fs matching).
However, with the advent of better module selection inside of Qunit itself I'm not sure how much sense this makes? Maybe for CI mode?
/cc @trentmwillis
This is related to the module normalization and testing unification RFC's. When those two RFC's are implemented this should "just work".
I personally dislike co-locating test code and app code. That said, I think after the module RFC lands, this could make more sense. Some questions to consider:
Where do test-helpers live?
wherever they make sense contextually
Where do acceptance tests live? Specifically, tests that are not tied to a specific route or span multiple routes.
sibling to engines/apps
How would this affect linting configs? I imagine many folks have slightly different linting rules for test code than they do for app code (ex: more allowed globals).
I would imagine pods could contain a test dir, that could contain the specific linting rules, Although yes this does seem bad.
@trentmwillis i believe the value here would be for unit level test, tests that are highly contextual. Atleast that is the thought.
This is related to https://github.com/ember-cli/ember-cli/issues/4461
We are working on closing the ember-cli/rfcs repo in favor of using a single central RFC's repo for everything. This was laid out in https://emberjs.github.io/rfcs/0300-rfc-process-update.html.
Sorry for the troubles, but would you mind reviewing to see if this is still something we need, and if so migrating this over to emberjs/rfcs?
In the spirit of independent components and the better organization of pods, I think that being able to save and run tests frompods will help to keep the file structure more organized.