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 stub id prefix #1786

Merged
merged 1 commit into from May 7, 2018
Merged

Fix stub id prefix #1786

merged 1 commit into from May 7, 2018

Conversation

mantoni
Copy link
Member

@mantoni mantoni commented May 7, 2018

Purpose (TL;DR) - mandatory

Each spy, stub and fake exposes an id property which should be named spy#{n}, stub#{n} and fake#{n} with {n} being incremented for each new instance. In case of a stub this property is generated but then replaced with spy#{n} due to a wrong function call order. This pull request fixes this and adds missing test cases (there was one for fakes, but none for spy or stub).

How to verify - mandatory

  1. Check out this branch
  2. npm install
  3. npm test

Checklist for author

  • npm run lint passes
  • References to standard library functions are cached.

@mroderick mroderick merged commit c13bea3 into master May 7, 2018
@mroderick mroderick deleted the fix-stub-id branch May 7, 2018 17:21
@mroderick
Copy link
Member

This has been published as sinon@5.0.7

@mantoni
Copy link
Member Author

mantoni commented May 7, 2018

Thank you 🙂

papandreou added a commit to unexpectedjs/unexpected-sinon that referenced this pull request May 8, 2018
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

2 participants