Skip to content

Commit

Permalink
The spec says ".then()" not ".done()" -- oops
Browse files Browse the repository at this point in the history
  • Loading branch information
robrich committed May 12, 2014
1 parent b59182c commit 94c3c48
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/runTask.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ module.exports = function (task, taskName, taskTimeout, done) {
if (r && typeof r.done === 'function') {
// wait for promise to resolve
// FRAGILE: ASSUME: Promises/A+, see http://promises-aplus.github.io/promises-spec/
r.done(function () {
r.then(function () {
finish(null, 'promise');
}, function(err) {
finish(err, 'promise');
Expand Down

2 comments on commit 94c3c48

@RoystonS
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line 49 is still testing for done being a function rather than then. Are there any unit tests for promises support?

@robrich
Copy link
Owner Author

@robrich robrich commented on 94c3c48 May 15, 2014 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.