Skip to content

Commit

Permalink
merge doc changes to released versions
Browse files Browse the repository at this point in the history
  • Loading branch information
Flarna authored and mroderick committed Feb 24, 2018
1 parent 4cf8a83 commit ae22a33
Show file tree
Hide file tree
Showing 37 changed files with 612 additions and 208 deletions.
20 changes: 15 additions & 5 deletions docs/_releases/v1.17.6/assertions.md
Expand Up @@ -78,20 +78,24 @@ 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.

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


#### `sinon.assert.alwaysCalledOn(spy, obj)`

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.

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


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

Expand All @@ -103,22 +107,26 @@ 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.

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


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

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.

This behaves the same way as `sinon.assert.calledWith(spy, sinon.match(arg1), sinon.match(arg2), ...)`.

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


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

Expand All @@ -134,14 +142,16 @@ 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.

The exception can be a `String` denoting its type, or an actual object.

If only one argument is provided, the assertion passes if `spy` ever threw any exception.

It's possible to assert on a dedicated spy call: `sinon.assert.threw(spy.thirdCall, exception);`.


#### `sinon.assert.alwaysThrew(spy, exception);`

Expand Down
20 changes: 15 additions & 5 deletions docs/_releases/v1.17.7/assertions.md
Expand Up @@ -78,20 +78,24 @@ 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.

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


#### `sinon.assert.alwaysCalledOn(spy, obj)`

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.

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


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

Expand All @@ -103,22 +107,26 @@ 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.

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


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

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.

This behaves the same way as `sinon.assert.calledWith(spy, sinon.match(arg1), sinon.match(arg2), ...)`.

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


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

Expand All @@ -134,14 +142,16 @@ 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.

The exception can be a `String` denoting its type, or an actual object.

If only one argument is provided, the assertion passes if `spy` ever threw any exception.

It's possible to assert on a dedicated spy call: `sinon.assert.threw(spy.thirdCall, exception);`.


#### `sinon.assert.alwaysThrew(spy, exception);`

Expand Down
20 changes: 15 additions & 5 deletions docs/_releases/v2.0.0/assertions.md
Expand Up @@ -78,20 +78,24 @@ 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.

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


#### `sinon.assert.alwaysCalledOn(spy, obj)`

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.

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


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

Expand All @@ -103,22 +107,26 @@ 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.

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


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

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.

This behaves the same way as `sinon.assert.calledWith(spy, sinon.match(arg1), sinon.match(arg2), ...)`.

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


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

Expand All @@ -134,14 +142,16 @@ 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.

The exception can be a `String` denoting its type, or an actual object.

If only one argument is provided, the assertion passes if `spy` ever threw any exception.

It's possible to assert on a dedicated spy call: `sinon.assert.threw(spy.thirdCall, exception);`.


#### `sinon.assert.alwaysThrew(spy, exception);`

Expand Down
32 changes: 21 additions & 11 deletions docs/_releases/v2.1.0/assertions.md
Expand Up @@ -65,33 +65,37 @@ Passes if `spy` was called once and only once.
Passes if `spy` was called exactly twice.


#### `sinon.assert.calledThrice(spy);`
#### `sinon.assert.calledThrice(spy)`

Passes if `spy` was called exactly three times.


#### `sinon.assert.callCount(spy, num);`
#### `sinon.assert.callCount(spy, num)`
Passes if `spy` was called exactly `num` times.


#### `sinon.assert.callOrder(spy1, spy2, ...);`
#### `sinon.assert.callOrder(spy1, spy2, ...)`
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.

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

#### `sinon.assert.alwaysCalledOn(spy, obj);`

#### `sinon.assert.alwaysCalledOn(spy, obj)`

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.

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


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

Expand All @@ -103,45 +107,51 @@ 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.

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


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

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.

This behaves the same way as `sinon.assert.calledWith(spy, sinon.match(arg1), sinon.match(arg2), ...)`.

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

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

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

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.neverCalledWithMatch(spy, arg1, arg2, ...);`
#### `sinon.assert.neverCalledWithMatch(spy, arg1, arg2, ...)`

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.

The exception can be a `String` denoting its type, or an actual object.

If only one argument is provided, the assertion passes if `spy` ever threw any exception.

It's possible to assert on a dedicated spy call: `sinon.assert.threw(spy.thirdCall, exception);`.


#### `sinon.assert.alwaysThrew(spy, exception);`

Expand Down
20 changes: 15 additions & 5 deletions docs/_releases/v2.2.0/assertions.md
Expand Up @@ -78,20 +78,24 @@ 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.

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


#### `sinon.assert.alwaysCalledOn(spy, obj)`

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.

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


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

Expand All @@ -103,22 +107,26 @@ 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.

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


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

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.

This behaves the same way as `sinon.assert.calledWith(spy, sinon.match(arg1), sinon.match(arg2), ...)`.

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


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

Expand All @@ -134,14 +142,16 @@ 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.

The exception can be a `String` denoting its type, or an actual object.

If only one argument is provided, the assertion passes if `spy` ever threw any exception.

It's possible to assert on a dedicated spy call: `sinon.assert.threw(spy.thirdCall, exception);`.


#### `sinon.assert.alwaysThrew(spy, exception);`

Expand Down

0 comments on commit ae22a33

Please sign in to comment.