-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Allow addons to inject middleware into testem #2128
Allow addons to inject middleware into testem #2128
Conversation
Closes #7 Depends upon ember-cli/ember-cli#2128
Seems somewhat odd that we would have two different middleware mechanisms.
Seems like we could put those two things without adding a new hook or requiring changes to testem. |
@rwjblue I disagree. This allows addon authors to specifically target middlewares for each environment. There are many middlewares that don't need to run in testem. |
The middlewares already receive an options hash (which can be used to only add middlewares in a given environment for example). Also, running the ember test commands set an environment variable (and the command itself should be in that options hash). I think this implementation is good, I just generally do not think we need to support two similar but different API's for roughly the same thing. |
Managing one middleware stack for two separate express servers is going to be a huge PITA. Rather than a clean API you're suggesting adding complexity to existing middleware functions to support different environments or conditionally turn on/off middleware when necessary. That feels odd to me. |
Furthermore, this is already done. |
Point of clarification: I am suggesting using a single express server (ours), this solution suggests using two (our for some middlewares and testems for others). |
The doneness however is a wonderful point. 😃 |
My argument could be completely moot if testem/testem#410 fails to get merged |
@rwjblue testem/testem#410 has been merged and testem |
@bcardarella travis is emo, otherwise not at all. |
This PR depends upon testem/testem#410 being accepted Primarily the use case is with any addon that injects a middleware into the ember server's, this will allow addon authors to also expose that middleware through `ember test` if/when noted PR above is accepted by @airportyh
Allow addons to inject middleware into testem
Bomb's away! |
@bcardarella !!! |
I'm a little confused about how this PR can(not) solve my use case. I would like In attempting to figure this out I noticed that |
i don't believe the full machinery to support this is implemented yet. I would like to suggest we unified the test runner, and merely via configuration tell it to run once or run continuously (ala --server) this would allow improvements to either code path to immediately improve the other. |
Closes #7 Depends upon ember-cli/ember-cli#2128
This PR depends upon testem/testem#410 being
accepted before it should be pulled in
Primarily the use case is with any addon that injects a middleware into
the ember server's, this will allow addon authors to also expose that
middleware through
ember test
if/when noted PR above is accepted by@airportyh