Skip to content

Conversation

@rgroothuijsen
Copy link
Contributor

Purpose (TL;DR)

Documentation update for #1535 that adds missing assert.calledWithNew.

Background (Problem in detail)

It was reported that there was no assert.calledWithNew, while Assert did feature most other assertions that Spy had.

Solution

Upon investigation, it turned out that Assert did in fact have this method, but it had been left out in the API documentation.

How to verify

  1. Check out this branch
  2. npm install
  3. node
  4. var sinonAssert = require("./lib/sinon/assert")
  5. var sinonSpy = require("./lib/sinon/spy")
  6. var testSpy = sinonSpy()
  7. new testSpy()
  8. sinonAssert.calledWithNew(testSpy) // this should not throw an exception

Checklist for author

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

@rgroothuijsen rgroothuijsen changed the title Documentation update for sinonjs/sinon#1535. Documentation update for assert.calledWithNew Aug 26, 2017
@fatso83 fatso83 merged commit b8fb160 into sinonjs:master Aug 26, 2017
@fatso83
Copy link
Contributor

fatso83 commented Aug 26, 2017

Thanks!

@rgroothuijsen rgroothuijsen deleted the issue1535 branch August 26, 2017 17:25
franck-romano pushed a commit to franck-romano/sinon that referenced this pull request Oct 1, 2019
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