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

Next fakes #1700

Merged
merged 27 commits into from
Feb 25, 2018
Merged

Next fakes #1700

merged 27 commits into from
Feb 25, 2018

Conversation

mroderick
Copy link
Member

This PR replaces #1586.

It is a solution for the proposal in #1559, and will be merged into the next branch.

The only difference between the two is that I used git rebase -i a lot and tidied up the history, so it will read better for Future Contributor

Tasks

  • Make the main sinon object a default sandbox
  • Create sandbox.replace method
  • Document sandbox.replace
  • Create sandbox.replaceGetter method
  • Document sandbox.replaceGetter
  • Create sandbox.replaceSetter method
  • Document sandbox.replaceSetter
  • Create sinon.fake
  • Clean unwanted methods from fake [.withArguments, etc]
  • Document sinon.fake
  • Put release candidates on npm as sinon@next to get feedback

Make it clearer what the tip about using `sinon.reset()` for resetting
stubs actually does.
Explain how to update to use the default sandbox
@mroderick mroderick mentioned this pull request Feb 25, 2018
11 tasks
Copy link
Member

@mantoni mantoni left a comment

Choose a reason for hiding this comment

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

Looks very tidy!

@mroderick mroderick merged commit 382bfa9 into sinonjs:next Feb 25, 2018
@mroderick mroderick deleted the next-fakes branch February 25, 2018 08:41
@mroderick
Copy link
Member Author

Thanks

glasserc added a commit to Kinto/kinto-http.js that referenced this pull request Apr 9, 2018
* Update tests to include bucket:create permission

* Use sinon.createSandbox instead of sinon.sandbox.create

This seems to be the first of many consequences from
sinonjs/sinon#1586 and
sinonjs/sinon#1700. I'm not sure what the
final result of all of this will be -- we might not even need this
sandbox any more, because a default one is created for us -- but at
some point in the future, we'll probably have to rewrite everything
that uses a stub(), and I prefer to wait until then to make any
drastic changes. This just silences the warnings until then.

* Try to make tests work on both kinto versions
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.

2 participants