Skip to content

Commit e23406f

Browse files
authored
Add brief note about .always prefix (#153)
This is the only instance (besides the `not` methods) where we don't just tack the method name on the end, so it seems worth a call-out, as it has already confused at least two people per #139
1 parent faaf5df commit e23406f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ For more information on the behavior of each assertion, see
6060
[the documentation for the corresponding spy methods][spymethods]. These of course work on not only spies, but
6161
individual spy calls, stubs, and mocks as well.
6262

63-
Note that you can negate any assertion with Chai's `.not`. E. g. for `notCalled` use `spy.should.have.not.been.called`.
63+
Note that you can negate any assertion with Chai's `.not`. E. g. for `notCalled` use `spy.should.have.not.been.called`. Similarly, note that the `always` methods are accessed with Chai's `.always` prefix; `should.have.been.alwaysCalledWith` will not work - instead, use `should.always.have.been.calledWith`.
6464

6565
For simplicity, this library intentionally only implements Sinon's spy methods, and does not add an interface for `Sinon.assert.match`. Sinon's matchers are implemented by the `samsam` library, so if you want a should/expect interface to `assert.match` you may be interested in [chai-samsam](https://www.chaijs.com/plugins/chai-samsam/), which adds a `.deep.match` verb that will work with Sinon matchers.
6666

0 commit comments

Comments
 (0)