-
-
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
[DEPRECATION] Deprecate globals resolver #18436
Conversation
YEAAAAAASSSSSSSSSSSS cc @scalvert I was just complaining to you that this still existed the other day :D |
2c4938a
to
e545ec8
Compare
packages/@ember/-internals/glimmer/tests/integration/application/engine-test.js
Outdated
Show resolved
Hide resolved
packages/@ember/-internals/glimmer/tests/integration/application/engine-test.js
Outdated
Show resolved
Hide resolved
Thank you for reviewing and providing feedback, @rwjblue . I'm working on this. |
e545ec8
to
74194e9
Compare
@rwjblue Updated. I hope this alleviates most of your concerns. |
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 working on this!
@@ -198,6 +198,7 @@ moduleFor( | |||
} | |||
|
|||
[`@test no assertion for routes that extend from Route`](assert) { | |||
assert.test.assertions = []; // clear assertions that occurred in beforeEach |
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.
Hmm, why do we need to clear the assertions?
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.
In beforeEach we are creaing an application using the default resolver. This throws off the following assert.expect statements.
@@ -13,7 +13,12 @@ moduleFor( | |||
constructor() { | |||
super(); | |||
|
|||
application = run(EmberApplication, 'create'); | |||
// Must use default resolver because test resolver does not normalize |
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.
Gotcha, so lets split the tests that rely on the globals resolver into their own moduleFor + class (e.g. moduleFor('Application Dependency Injection - Globals Resolver [DEPRECATED]', class extends TestCase {})
).
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.
There's only one test that relies on it, so I'm just going to move it into default_resolver_test.js
.
packages/@ember/application/tests/dependency_injection/normalization_test.js
Show resolved
Hide resolved
I think we also need to add some svelting conditionals (so we can strip the deprecated code paths). The basic steps for this are:
Some example PRs that have landed that might be helpful: |
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.
Looks great, only one minor nit-pick left.
Co-Authored-By: Robert Jackson <me@rwjblue.com>
Thank you @Gaurav0! |
Thank you @rwjblue ! |
For emberjs/rfc-tracking#20