Skip to content

Commit

Permalink
Add jsdoc
Browse files Browse the repository at this point in the history
  • Loading branch information
briancavalier committed Mar 11, 2014
1 parent 88f7e6f commit cfb4050
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 11 deletions.
6 changes: 6 additions & 0 deletions lib/makePromise.js
Expand Up @@ -294,6 +294,12 @@ define(function() {
return typeof this._env.promiseMonitor !== 'undefined';
};

/**
* Abstract base for handler that delegates to another handler
* @private
* @param {object} handler
* @constructor
*/
function DelegateHandler(handler) {
this.handler = handler;
}
Expand Down
14 changes: 3 additions & 11 deletions test/monitor/all.js
Expand Up @@ -15,17 +15,9 @@

var when = require('../../when');

when.resolve().then(function outer() {
// return when.resolve().then(function inner() {
return when.resolve().then(function evenMoreInner() {
a.b.c.d()
});
// });
});

// var p = when.reject(new Error('fail1'));
//
// when.all([p]);
var p = when.reject(new Error('fail1'));

when.all([p]);

});
}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(require); }));
Expand Down
8 changes: 8 additions & 0 deletions test/monitor/deep-chain.js
Expand Up @@ -15,6 +15,14 @@

var Promise = require('../../when').Promise;

Promise.resolve().then(function outer() {
return Promise.resolve().then(function inner() {
return Promise.resolve().then(function evenMoreInner() {
foo()
});
});
});

function f1() {
return Promise.resolve(123);
}
Expand Down

0 comments on commit cfb4050

Please sign in to comment.