Skip to content

Commit

Permalink
Add brief note about .always prefix
Browse files Browse the repository at this point in the history
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 chaijs#139
  • Loading branch information
cincodenada authored Nov 2, 2021
1 parent 74a1bc0 commit 89ff63e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ For more information on the behavior of each assertion, see
[the documentation for the corresponding spy methods][spymethods]. These of course work on not only spies, but
individual spy calls, stubs, and mocks as well.

Note that you can negate any assertion with Chai's `.not`. E. g. for `notCalled` use `spy.should.have.not.been.called`.
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`.

For `assert` interface there is no need for this library. You can install [Sinon.JS assertions][sinonassertions] right into Chai's `assert` object with `expose`:

Expand Down

0 comments on commit 89ff63e

Please sign in to comment.