Skip to content

Commit

Permalink
Add pointer to chai-samsam for Sinon.assert.match (#156)
Browse files Browse the repository at this point in the history
Sinon has one outlier assertion, `Sinon.assert.match`, that is not a spy method, and doesn't make sense to implement as part of this library, so instead add a pointer to `chai-samsam`, which implements a compatible assertion separately.
  • Loading branch information
cincodenada authored Apr 29, 2022
1 parent 74a1bc0 commit faaf5df
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ 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`.

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`:
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.

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

```javascript
var chai = require("chai");
Expand Down

0 comments on commit faaf5df

Please sign in to comment.