-
-
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
Using sinon triggers deprecation warnings in tests. #17046
Comments
@Gaurav0 yeah I see this in the console:
And when I remove sinon as a dependency the deprecation is gone. |
Confirmed. I see this in my apps as well. Is there a workaround? Can a deprecated property like |
Thanks for opening this, I’m finding this too while working on fixing deprecations while updating |
So roughly the issue here is that sinon wraps the modules and tries to clone the prototypes of each property of default exports in order to prepare for stubbing. That in turn results in the following call that iterates return Object.getOwnPropertyNames(u).reduce(function(l, n) {
return "size" !== n && "caller" !== n && "callee" !== n && "arguments" !== n && "function" == typeof u[n] && (l[n] = e.bind(u[n])),
l
}, Object.create(null)) |
In other words, either OR Ignore the deprecation warning and it will go away once |
I think that #17190 (comment) is the same issue here.
|
See reproduction (open console): https://ember-twiddle.com/969a3d23d9ef9b6ae643cff85cb07183?openFiles=twiddle.json%2C
sinon enumerates objects and thus finds and accesses deprecated properties, causing deprecation warnings in tests.
The text was updated successfully, but these errors were encountered: