From 89ff63e6028097707d016171c0c7f45e79aea8d6 Mon Sep 17 00:00:00 2001 From: Joel Bradshaw Date: Tue, 2 Nov 2021 10:33:34 -0700 Subject: [PATCH] Add brief note about `.always` prefix 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 https://github.com/domenic/sinon-chai/issues/139 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 85a943c..36bd191 100644 --- a/README.md +++ b/README.md @@ -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`: