-
-
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
can no longer stub/spy (via sinon) on _super
call in Ember 2.1, 2.2-beta.1
#12457
Comments
Spying on |
Agreed on |
The The change that is causing this issue with spying is that in prior versions the value of That PR fixed a number of issues (and is much easier to debug) so it seems unlikely that we would revert this behavior change... |
@rwjblue that's pretty much what i assumed was going on after looking through the CHANGELOG, but thx for confirming. @mixonic that solution makes sense and will def work for my use cases my only lingering concern is the behavior happening when spying/stubbing would there be any value added to throwing a warning to the user if they are making an unnecessary |
It is also worth noting, es6 |
Recent Ember does not support this. See: emberjs/ember.js#12457
this is obviously only relevant in testing and i haven't tested another stubbing library other than sinon.
example:
i understand this example is a little awkward because you can run the assertion on what is returned from
modelNameFromPayload
, but I have a couple other instances where you Il manipulate an argument and confirm that the manipulation is correct and not what is actually happening after you call_super
as an additional bonus i have a mixin that has a method that call
_super
, that does works as expected if it's used in anEmber.Object
that does not have the super methodThe text was updated successfully, but these errors were encountered: