Skip to content

Commit 05f05ac

Browse files
authored
docs: Remove threw(obj) from docs (#2513)
Since the introduction of threw in 0feec9f, no one have reported that `threw(obj)` doesn't work as the documentation states. ```js const sinon = require("sinon"); const o = { pie: "apple" }; const f = sinon.fake.throws(o); f(); // this is supposed to return true f.threw(o); // => false ``` Since it has been 12+ years without an error report, it's safe to assume that no one uses the `threw` method in this way. Let's remove it from the documentation.
1 parent 7e13966 commit 05f05ac

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

docs/release-source/release/spies.md

-8
Original file line numberDiff line numberDiff line change
@@ -282,10 +282,6 @@ Returns `true` if spy threw an exception at least once.
282282

283283
Returns `true` if spy threw an exception of the provided type at least once.
284284

285-
#### `spy.threw(obj);`
286-
287-
Returns `true` if spy threw the provided exception object at least once.
288-
289285
#### `spy.alwaysThrew();`
290286

291287
Returns `true` if spy always threw an exception.
@@ -294,10 +290,6 @@ Returns `true` if spy always threw an exception.
294290

295291
Returns `true` if spy always threw an exception of the provided type.
296292

297-
#### `spy.alwaysThrew(obj);`
298-
299-
Returns `true` if spy always threw the provided exception object.
300-
301293
#### `spy.returned(obj);`
302294

303295
Returns `true` if spy returned the provided value at least once.

0 commit comments

Comments
 (0)