Update checked-in dependencies

This commit is contained in:
github-actions[bot] 2025-03-24 21:18:42 +00:00
parent 08e5c8d618
commit 5275714183
148 changed files with 4045 additions and 39247 deletions

View file

@ -7,18 +7,11 @@ const fakeTimers = require("./sinon/util/fake-timers");
const Sandbox = require("./sinon/sandbox");
const stub = require("./sinon/stub");
const promise = require("./sinon/promise");
const nise = require("nise");
const assert = require("assert");
/**
* @param {object} opts injection point to override the default XHR lib in testing
* @param {object} opts.sinonXhrLib
* @returns {object} a configured sandbox
*/
module.exports = function createApi(opts = { sinonXhrLib: nise }) {
assert(opts?.sinonXhrLib, "No XHR lib passed in");
const { sinonXhrLib } = opts;
module.exports = function createApi() {
const apiMethods = {
createSandbox: createSandbox,
match: require("@sinonjs/samsam").createMatcher,
@ -29,20 +22,6 @@ module.exports = function createApi(opts = { sinonXhrLib: nise }) {
// fake timers
timers: fakeTimers.timers,
// fake XHR
xhr: sinonXhrLib.fakeXhr.xhr,
FakeXMLHttpRequest: sinonXhrLib.fakeXhr.FakeXMLHttpRequest,
// fake server
fakeServer: sinonXhrLib.fakeServer,
fakeServerWithClock: sinonXhrLib.fakeServerWithClock,
createFakeServer: sinonXhrLib.fakeServer.create.bind(
sinonXhrLib.fakeServer,
),
createFakeServerWithClock: sinonXhrLib.fakeServerWithClock.create.bind(
sinonXhrLib.fakeServerWithClock,
),
addBehavior: function (name, fn) {
behavior.addBehavior(stub, name, fn);
},