Skip to content
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

Fix 1445: make stubbing of static function properties possible #1450

Conversation

raulmatei
Copy link
Contributor

Purpose (TL;DR) - mandatory

Fix issue #1445 related to stubbing function static properties by adding an extra check for the object type to be a function

@coveralls
Copy link

coveralls commented Jun 6, 2017

Coverage Status

Coverage remained the same at 94.957% when pulling 452981c on raulmatei:fix-1445-sandbox-stubbing-static-function-property-throws-error into 25f3eeb on sinonjs:master.

Copy link
Member

@lucasfcosta lucasfcosta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!
Thanks for this @raulmatei.

@fatso83 fatso83 merged commit 1ece07c into sinonjs:master Jun 7, 2017
@mroderick
Copy link
Member

I think this looks like a new MINOR version. What say you @sinonjs/core?

@lucasfcosta
Copy link
Member

@mroderick I think this looks more like a PATCH, because this should have been possible before. AFAIK this is what we expected from the sandbox API since the beginning of its design.

According to the docs:

The sandbox stub method can also be used to stub any kind of property. This is useful if you need to override an object’s property for the duration of a test, and have it restored when the test completes.

@mroderick
Copy link
Member

Cheers @lucasfcosta!

I've published this change as v2.3.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants