Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Flarna authored and mroderick committed Feb 24, 2018
1 parent cbc5667 commit 6e7e71f
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions docs/release-source/release/assertions.md
Expand Up @@ -78,7 +78,7 @@ Passes if `spy` was called exactly `num` times.
Passes if provided spies were called in the specified order.


#### `sinon.assert.calledOn(spy, obj)`
#### `sinon.assert.calledOn(spyOrSpyCall, obj)`

Passes if `spy` was ever called with `obj` as its `this` value.

Expand All @@ -90,7 +90,7 @@ It's possible to assert on a dedicated spy call: `sinon.assert.calledOn(spy.firs
Passes if `spy` was always called with `obj` as its `this` value.


#### `sinon.assert.calledWith(spy, arg1, arg2, ...);`
#### `sinon.assert.calledWith(spyOrSpyCall, arg1, arg2, ...);`

Passes if `spy` was called with the provided arguments.

Expand All @@ -107,7 +107,7 @@ Passes if `spy` was always called with the provided arguments.
Passes if `spy` was never called with the provided arguments.


#### `sinon.assert.calledWithExactly(spy, arg1, arg2, ...);`
#### `sinon.assert.calledWithExactly(spyOrSpyCall, arg1, arg2, ...);`

Passes if `spy` was called with the provided arguments and no others.

Expand All @@ -119,7 +119,7 @@ It's possible to assert on a dedicated spy call: `sinon.assert.calledWithExactly
Passes if `spy` was always called with the provided arguments and no others.


#### `sinon.assert.calledWithMatch(spy, arg1, arg2, ...)`
#### `sinon.assert.calledWithMatch(spyOrSpyCall, arg1, arg2, ...)`

Passes if `spy` was called with matching arguments.

Expand All @@ -135,10 +135,12 @@ Passes if `spy` was always called with matching arguments.
This behaves the same way as `sinon.assert.alwaysCalledWith(spy, sinon.match(arg1), sinon.match(arg2), ...)`.


#### `sinon.assert.calledWithNew(spy)`
#### `sinon.assert.calledWithNew(spyOrSpyCall)`

Passes if `spy` was called with the `new` operator.

It's possible to assert on a dedicated spy call: `sinon.assert.calledWithNew(spy.secondCall, arg1, arg2, ...);`.


#### `sinon.assert.neverCalledWithMatch(spy, arg1, arg2, ...)`

Expand All @@ -147,7 +149,7 @@ Passes if `spy` was never called with matching arguments.
This behaves the same way as `sinon.assert.neverCalledWith(spy, sinon.match(arg1), sinon.match(arg2), ...)`.


#### `sinon.assert.threw(spy, exception);`
#### `sinon.assert.threw(spyOrSpyCall, exception);`

Passes if `spy` threw the given exception.

Expand Down

0 comments on commit 6e7e71f

Please sign in to comment.