You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/release-source/release/assertions.md
+3-9Lines changed: 3 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ breadcrumb: assertions
6
6
7
7
Sinon.JS ships with a set of assertions that mirror most behavior verification methods and properties on spies and stubs. The advantage of using the assertions is that failed expectations on stubs and spies can be expressed directly as assertion failures with detailed and helpful error messages.
8
8
9
-
To make sure assertions integrate nicely with your test framework, you should customize either `sinon.assert.fail` or `sinon.assert.failException` and look into `sinon.assert.expose` and `sinon.assert.pass`.
9
+
To make sure assertions integrate nicely with your test framework, you should customize `sinon.assert.fail` and look into `sinon.assert.expose` and `sinon.assert.pass`.
10
10
11
11
The assertions can be used with either spies or stubs.
12
12
@@ -29,13 +29,7 @@ The assertions can be used with either spies or stubs.
29
29
30
30
Every assertion fails by calling this method.
31
31
32
-
By default it throws an error of type `sinon.assert.failException`.
33
-
34
-
If the test framework looks for assertion errors by checking for a specific exception, you can override the kind of exception thrown. If that does not fit with your testing framework of choice, override the `fail` method to do the right thing.
35
-
36
-
#### `sinon.assert.failException;`
37
-
38
-
Defaults to `AssertError`.
32
+
If your testing framework of choice looks for assertion errors by checking for a specific exception, you can override the `fail` method to do the right thing.
39
33
40
34
#### `sinon.assert.pass(assertion);`
41
35
@@ -197,6 +191,6 @@ The method accepts an optional options object with two options.
197
191
<dd>is a prefix to give assertions. By default it is "assert", so <code>sinon.assert.called</code> becomes <code>target.assertCalled</code>. By passing a blank string, the exposed method will be <code>target.called</code>.</dd>
198
192
199
193
<dt>includeFail</dt>
200
-
<dd><code>true</code> by default, copies over the <code>fail</code> and <code>failException</code> properties</dd>
194
+
<dd><code>true</code> by default, copies over the <code>fail</code> property</dd>
0 commit comments