-
-
Notifications
You must be signed in to change notification settings - Fork 4.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
Refactor router: remove owner presence checks #19458
Conversation
🤔 Unless I miss somehing, fhe failing browserstack tests do not seem related to this. |
Ya, this is intentional. There are a number of scenarios where we only want to do partial setup. For example, in rendering tests (for a normal ember-cli project) we might want to render |
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.
Thanks for cleaning this up! I restarted CI (the failure in IE11 was unrelated).
['@test can create a router without an owner'](assert) { | ||
createRouter(undefined, { disableSetup: true, skipOwner: true }); | ||
|
||
assert.ok(true, 'no errors were thrown when creating without a container'); | ||
} |
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.
This test is very odd, 👍 on removing
2bb231a
to
537c34f
Compare
Thanks! |
@rwjblue This follows the discussion we had about this.
That way, I think it removes a useless small mental overhead.
Also as it was a concern only in tests, I think it's better.
Feedback welcome :)
To go a little further, I was wondering if the setupRouter() thing could be removed too ?
Maybe it's by design, but usually it feels wrong to me when there is such a 'two steps construction' before we can actually interact with an instance.