From 5fc17c73681b095a0ebd69ac9be783bf6efe7406 Mon Sep 17 00:00:00 2001 From: Carl-Erik Kopseng Date: Mon, 14 Aug 2023 00:59:24 +0200 Subject: [PATCH] Remove dead code See https://app.codecov.io/gh/sinonjs/sinon/pull/2535/blob/lib/sinon/sandbox.js --- lib/sinon/sandbox.js | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/lib/sinon/sandbox.js b/lib/sinon/sandbox.js index d5a925a94..90aca375a 100644 --- a/lib/sinon/sandbox.js +++ b/lib/sinon/sandbox.js @@ -158,23 +158,7 @@ function Sandbox() { } } - forEach(collection, function (fake) { - if (typeof fake === "function") { - privateResetHistory(fake); - return; - } - - const methods = []; - if (fake.get) { - push(methods, fake.get); - } - - if (fake.set) { - push(methods, fake.set); - } - - forEach(methods, privateResetHistory); - }); + forEach(collection, privateResetHistory); }; sandbox.restore = function restore() {