From 05f05ac30b1cb95c57dde3e30a4952679afb309a Mon Sep 17 00:00:00 2001 From: Morgan Roderick <20321+mroderick@users.noreply.github.com> Date: Tue, 23 May 2023 11:13:51 +0200 Subject: [PATCH] docs: Remove threw(obj) from docs (#2513) Since the introduction of threw in 0feec9ffba0da6bc2996cefa0c6e71872e8bedb2, 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. --- docs/release-source/release/spies.md | 8 -------- 1 file changed, 8 deletions(-) diff --git a/docs/release-source/release/spies.md b/docs/release-source/release/spies.md index dba8861a8..9c23fba48 100644 --- a/docs/release-source/release/spies.md +++ b/docs/release-source/release/spies.md @@ -282,10 +282,6 @@ Returns `true` if spy threw an exception at least once. Returns `true` if spy threw an exception of the provided type at least once. -#### `spy.threw(obj);` - -Returns `true` if spy threw the provided exception object at least once. - #### `spy.alwaysThrew();` Returns `true` if spy always threw an exception. @@ -294,10 +290,6 @@ Returns `true` if spy always threw an exception. Returns `true` if spy always threw an exception of the provided type. -#### `spy.alwaysThrew(obj);` - -Returns `true` if spy always threw the provided exception object. - #### `spy.returned(obj);` Returns `true` if spy returned the provided value at least once.