We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fe799e7 commit 5fc17c7Copy full SHA for 5fc17c7
lib/sinon/sandbox.js
@@ -158,23 +158,7 @@ function Sandbox() {
158
}
159
160
161
- forEach(collection, function (fake) {
162
- if (typeof fake === "function") {
163
- privateResetHistory(fake);
164
- return;
165
- }
166
-
167
- const methods = [];
168
- if (fake.get) {
169
- push(methods, fake.get);
170
171
172
- if (fake.set) {
173
- push(methods, fake.set);
174
175
176
- forEach(methods, privateResetHistory);
177
- });
+ forEach(collection, privateResetHistory);
178
};
179
180
sandbox.restore = function restore() {
0 commit comments