UNPKG

nisemono

Version:

Pretty simple test double library

28 lines (25 loc) 440 B
var Promise = global.Promise; /** * @namespace promise */ var promise = { /** * Return current Promise constructor */ constructor: function() { return Promise; }, /** * Use the specified Promise constructor instead */ use: function(constructor) { Promise = constructor; }, /** * Use default Promise */ restoreDefault: function() { Promise = global.Promise; } }; module.exports = promise;