File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -7,15 +7,17 @@ const fakeTimers = require("./sinon/util/fake-timers");
77const Sandbox = require ( "./sinon/sandbox" ) ;
88const stub = require ( "./sinon/stub" ) ;
99const promise = require ( "./sinon/promise" ) ;
10- const assert = require ( "node:assert" ) ;
10+ const nise = require ( "nise" ) ;
11+ const assert = require ( "assert" ) ;
1112
1213/**
1314 * @param {object } opts injection point to override the default XHR lib in testing
1415 * @param {object } opts.sinonXhrLib
1516 * @returns {object } a configured sandbox
1617 */
17- module . exports = function createApi ( { sinonXhrLib } ) {
18- assert ( sinonXhrLib , "No XHR lib passed in" ) ;
18+ module . exports = function createApi ( opts = { sinonXhrLib : nise } ) {
19+ assert ( opts ?. sinonXhrLib , "No XHR lib passed in" ) ;
20+ const { sinonXhrLib } = opts ;
1921
2022 const apiMethods = {
2123 createSandbox : createSandbox ,
Original file line number Diff line number Diff line change 11"use strict" ;
22
3- const nise = require ( "nise" ) ;
43const createApi = require ( "./create-sinon-api" ) ;
54
6- module . exports = createApi ( { sinonXhrLib : nise } ) ;
5+ module . exports = createApi ( ) ;
You can’t perform that action at this time.
0 commit comments