ember-cli / rfcs

Archive of RFCs for changes to ember-cli (for current RFC repo see https://github.com/emberjs/rfcs)
45 stars 54 forks source link

Run tests from pods #44

Closed keithkelly31 closed 5 years ago

keithkelly31 commented 8 years ago

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.

webark commented 8 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.

stefanpenner commented 8 years ago

tests in pods, and then being able to run only tests from a pod or two, seems like a great idea.

nathanhammond commented 8 years ago

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

rwjblue commented 8 years ago

This is related to the module normalization and testing unification RFC's. When those two RFC's are implemented this should "just work".

trentmwillis commented 8 years ago

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:

stefanpenner commented 8 years ago

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.

stefanpenner commented 8 years ago

@trentmwillis i believe the value here would be for unit level test, tests that are highly contextual. Atleast that is the thought.

MiguelMadero commented 8 years ago

This is related to https://github.com/ember-cli/ember-cli/issues/4461

rwjblue commented 5 years ago

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?