Skip to content

Commit e37e1a6

Browse files
committed
Remove deprecated core exports
This removes the following methods from the sinon object * calledInOrder * deepEqual * every * extend * format * functionName * functionToString * getConfig * getPropertyDescriptor * iterableToString * orderByFirstCall * restore * timesInWords * typeOf * walk * wrapMethod
1 parent 3938c12 commit e37e1a6

File tree

2 files changed

+3
-47
lines changed

2 files changed

+3
-47
lines changed

lib/sinon.js

Lines changed: 3 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,8 @@
11
"use strict";
22

3-
var match = require("./sinon/match");
4-
var deepEqual = require("./sinon/util/core/deep-equal");
5-
var deprecated = require("./sinon/util/core/deprecated");
6-
7-
function exposeCoreUtils(target, utils) {
8-
var keys = Object.keys(utils);
9-
10-
keys.forEach(function (key) {
11-
var value = utils[key];
12-
13-
// allow deepEqual to check equality of matchers through dependency injection. Otherwise we get a circular
14-
// dependency
15-
if (key === "deepEqual") {
16-
value = deepEqual.use(match);
17-
}
18-
if (typeof value === "function") {
19-
value = deprecated.wrap(value, deprecated.defaultMsg(key));
20-
}
21-
target[key] = value;
22-
});
23-
}
24-
25-
// Expose internal utilities on `sinon` global for backwards compatibility.
26-
exposeCoreUtils(exports, require("./sinon/util/core/index"));
27-
283
exports.assert = require("./sinon/assert");
294
exports.collection = require("./sinon/collection");
30-
exports.match = match;
5+
exports.match = require("./sinon/match");
316
exports.spy = require("./sinon/spy");
327
exports.spyCall = require("./sinon/call");
338
exports.stub = require("./sinon/stub");
@@ -36,6 +11,8 @@ exports.sandbox = require("./sinon/sandbox");
3611
exports.expectation = require("./sinon/mock-expectation");
3712
exports.createStubInstance = require("./sinon/stub").createStubInstance;
3813

14+
exports.defaultConfig = require("./sinon/util/core/default-config");
15+
3916
var fakeTimers = require("./sinon/util/fake_timers");
4017
exports.useFakeTimers = fakeTimers.useFakeTimers;
4118
exports.clock = fakeTimers.clock;

lib/sinon/util/core/index.js

Lines changed: 0 additions & 21 deletions
This file was deleted.

0 commit comments

Comments
 (0)