@@ -16,7 +16,6 @@ const sinonFake = require("./fake");
1616const valueToString = require ( "@sinonjs/commons" ) . valueToString ;
1717const fakeServer = require ( "nise" ) . fakeServer ;
1818const fakeXhr = require ( "nise" ) . fakeXhr ;
19- const usePromiseLibrary = require ( "./util/core/use-promise-library" ) ;
2019
2120const DEFAULT_LEAK_THRESHOLD = 10000 ;
2221
@@ -80,7 +79,6 @@ function Sandbox(opts = {}) {
8079 const sandbox = this ;
8180 const assertOptions = opts . assertOptions || { } ;
8281 let fakeRestorers = [ ] ;
83- let promiseLib ;
8482
8583 let collection = [ ] ;
8684 let loggedLeakWarning = false ;
@@ -117,8 +115,6 @@ function Sandbox(opts = {}) {
117115 addToCollection ( method ) ;
118116 } ) ;
119117
120- usePromiseLibrary ( promiseLib , ownMethods ) ;
121-
122118 return stubbed ;
123119 } ;
124120
@@ -177,7 +173,6 @@ function Sandbox(opts = {}) {
177173 const m = sinonMock . apply ( null , arguments ) ;
178174
179175 addToCollection ( m ) ;
180- usePromiseLibrary ( promiseLib , m ) ;
181176
182177 return m ;
183178 } ;
@@ -430,16 +425,12 @@ function Sandbox(opts = {}) {
430425 forEach ( ownMethods , function ( method ) {
431426 addToCollection ( method ) ;
432427 } ) ;
433-
434- usePromiseLibrary ( promiseLib , ownMethods ) ;
435428 } else if ( Array . isArray ( types ) ) {
436429 for ( const accessorType of types ) {
437430 addToCollection ( spy [ accessorType ] ) ;
438- usePromiseLibrary ( promiseLib , spy [ accessorType ] ) ;
439431 }
440432 } else {
441433 addToCollection ( spy ) ;
442- usePromiseLibrary ( promiseLib , spy ) ;
443434 }
444435
445436 return spy ;
@@ -524,13 +515,6 @@ function Sandbox(opts = {}) {
524515 addToCollection ( xhr ) ;
525516 return xhr ;
526517 } ;
527-
528- sandbox . usingPromise = function usingPromise ( promiseLibrary ) {
529- promiseLib = promiseLibrary ;
530- collection . promiseLibrary = promiseLibrary ;
531-
532- return sandbox ;
533- } ;
534518}
535519
536520Sandbox . prototype . match = match ;
0 commit comments