Skip to content

Commit

Permalink
Merge pull request #1180 from mroderick/add-documentation-for-assert.…
Browse files Browse the repository at this point in the history
…match

Add documentation for sinon.assert.match
  • Loading branch information
fatso83 committed Nov 18, 2016
2 parents 63ea11d + 4875211 commit f6e7916
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions docs/current/assertions.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,22 @@ If only one argument is provided, the assertion passes if `spy` ever threw any e

Like above, only required for all calls to the spy.

#### `sinon.assert.match(actual, expectation);`

Uses [`sinon.match`](./matchers.md) to test if the arguments can be considered a match.

```javascript
var sinon = require('sinon');

describe('example', function(){
it('should match on `x` property, and ignore `y` property', function() {
var expected = {x: 1},
actual = {x: 1, y: 2};

sinon.assert.match(actual, expected);
});
});
```

#### `sinon.assert.expose(object, options);`

Expand Down

0 comments on commit f6e7916

Please sign in to comment.