-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Modified the setup-ember-dev test helper to use ember-metal/debug
s override hooks
#4260
Conversation
This is great @workmanw! What are the next steps? Do you want some help fixing the failures due to deprecations? |
const AVAILABLE_ASSERTIONS = ['expectAssertion', 'expectDeprecation', 'expectNoDeprecation', 'expectWarning', 'expectNoWarning']; | ||
|
||
function getDebugFunction(name) { | ||
return Ember[name]; | ||
if (debugModule && debugModule.getDebugFunction) { | ||
return debugModule.getDebugFunction(); |
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.
Is this missing the name
being passed to getDebugFunction
?
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.
Ya, I think so...
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.
Ooops! Good catch. I'll fix that.
@bmac I guess I'm not completely sure about what the next steps should be. Maybe we should catalog the deprecations and see how easy they are to solve. |
46691f1
to
ba15b84
Compare
Basically I am 💯 👍 on this. My initial implementation was never the way to go anyway and using
I am not sure I follow completely: if I run the code in this PR locally via |
@pangratz Yea ... you're absolutely right. I swear there were test failures last night, but they're all gone today. ¯_(ツ)_/¯. I'll push up a change to get ember 1.13 working. |
ba15b84
to
fd9dc9e
Compare
…override hooks. Ember no longer uses `Ember.deprecate` internally, so overriding that has little effect.
fd9dc9e
to
2105fc3
Compare
Thanks @workmanw |
I've been helping to "addonify"® ember-data-model-fragments which also uses the
ember-dev
test suite. I noticed thatexpectNoDeprecations
was no longer working as expected. After investigating I discovered that because Ember no longer usesEmber.deprecate
internally, overriding that has little effect. I checked to see how ember-data's test suite handled this and discovered you have the same problem. See: setup-ember-dev.js#L7-L13.This PR fixes that issue by using
ember-metal/debug
proper hooks. This PR is meant to keep backwards compatibility and work with older versions of ember which did not offer these hooks. If the feeling is that ember and ember-data usage is truly lockstep, this PR could be simplified by removing thegetDebugFunction
andsetDebugFunction
all together. Example: ember-data-model-fragments/.../setup-ember-dev.js.Lastly, I ran the tests locally and there were quite a few failures due to deprecations spewing out. This PR was intended to start a discussion about that.Temporary insanity 😜 .