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/03-assertions.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -229,7 +229,7 @@ Finally, this returns a boolean indicating whether the assertion passed.
229
229
230
230
### `.throws(fn, expectation?, message?)`
231
231
232
-
Assert that an error is thrown. `fn` must be a function which should throw. The thrown value *must* be an error. It is returned so you can run more assertions against it. If the assertion fails then `null` is returned.
232
+
Assert that an error is thrown. `fn` must be a function which should throw. The thrown value *must* be an error. It is returned so you can run more assertions against it. If the assertion fails then `undefined` is returned.
233
233
234
234
`expectation` can be an object with one or more of the following properties:
235
235
@@ -261,7 +261,7 @@ test('throws', t => {
261
261
262
262
Assert that an error is thrown. `thrower` can be an async function which should throw, or a promise that should reject. This assertion must be awaited.
263
263
264
-
The thrown value *must* be an error. It is returned so you can run more assertions against it. If the assertion fails then `null` is returned.
264
+
The thrown value *must* be an error. It is returned so you can run more assertions against it. If the assertion fails then `undefined` is returned.
265
265
266
266
`expectation` can be an object with one or more of the following properties:
0 commit comments