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

Update sinon #13946

Merged
merged 2 commits into from
Mar 22, 2017
Merged

Update sinon #13946

merged 2 commits into from
Mar 22, 2017

Conversation

islemaster
Copy link
Contributor

@islemaster islemaster commented Mar 22, 2017

Updates sinon to 2.1.0 and makes a corresponding update to sinon-chai to 2.9.0. I'm doing this because I want to be able to use sinon.stub.resolves() and sinon.stub.rejects() for testing some promise-heavy code.

I only found one deprecation that affected us (and it was only printing a warning, but I cleaned it up anyway): stub(obj, 'methodName', func) is deprecated in favor of more idiomatic stub(obj, 'methodName').callsFake(func). It turns out most of the places we were doing this didn't really need a fake function anyway, they were returning undefined (which can just be stub(obj, 'methodName')) or a fixed value (stub(obj, 'methodName').returns(value)).

"Base64": "0.3.0",
"aws-sdk": "2.28.0",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Turns out yarn likes listing things alphabetically.

@islemaster islemaster merged commit d47acc2 into staging Mar 22, 2017
@islemaster islemaster deleted the update-sinon branch March 22, 2017 21:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants