Bones/node_modules/es6-shim/test/promise/promises-aplus.js
SOUTHERNCO\x2mjbyrn 7efe7605b8 Template Upload
2017-05-17 13:45:25 -04:00

24 lines
560 B
JavaScript

// tests from promises-aplus-tests
describe('Promises/A+ Tests', function () {
'use strict';
if (typeof Promise === 'undefined') {
return;
}
require('promises-aplus-tests').mocha({
// an adapter from es6 spec to Promises/A+
deferred: function () {
var result = {};
result.promise = new Promise(function (resolve, reject) {
result.resolve = resolve;
result.reject = reject;
});
return result;
},
resolved: Promise.resolve.bind(Promise),
rejected: Promise.reject.bind(Promise)
});
});