Skip to content

Commit

Permalink
Add documentation for sinon.assert.match
Browse files Browse the repository at this point in the history
  • Loading branch information
mroderick committed Nov 9, 2016
1 parent 4c2150e commit 4875211
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 4875211

Please sign in to comment.