mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-18 03:18:19 -07:00
22 lines
518 B
JavaScript
22 lines
518 B
JavaScript
// Adapter for "promises-aplus-tests" test runner
|
|
|
|
var path = require("path");
|
|
var Promise = require(path.join(__dirname,"lib","npo.src.js"));
|
|
|
|
module.exports.deferred = function __deferred__() {
|
|
var o = {};
|
|
o.promise = new Promise(function __Promise__(resolve,reject){
|
|
o.resolve = resolve;
|
|
o.reject = reject;
|
|
});
|
|
return o;
|
|
};
|
|
|
|
module.exports.resolved = function __resolved__(val) {
|
|
return Promise.resolve(val);
|
|
};
|
|
|
|
module.exports.rejected = function __rejected__(reason) {
|
|
return Promise.reject(reason);
|
|
};
|