chore(tests): add Promises/A+ Test Suite to the build

Closes #3693
This commit is contained in:
James Talmage
2013-08-21 19:17:07 -04:00
committed by Igor Minar
parent 5d9f42050a
commit e848099d1b
4 changed files with 42 additions and 4 deletions

View File

@@ -0,0 +1,15 @@
var isFunction = function isFunction(value){return typeof value == 'function';}
var $q = qFactory(process.nextTick, function noopExceptionHandler() {});
exports.fulfilled = $q.resolve;
exports.rejected = $q.reject;
exports.pending = function () {
var deferred = $q.defer();
return {
promise: deferred.promise,
fulfill: deferred.resolve,
reject: deferred.reject
};
};