Skip to content

Commit

Permalink
Merge pull request #1349 from jahraphael/master
Browse files Browse the repository at this point in the history
Print the name of the actual missing dependency in `async.auto`
  • Loading branch information
megawac committed Jan 9, 2017
2 parents ce7c752 + 4820ab8 commit d3f583a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion lib/auto.js
Expand Up @@ -137,7 +137,8 @@ export default function (tasks, concurrency, callback) {
arrayEach(dependencies, function (dependencyName) {
if (!tasks[dependencyName]) {
throw new Error('async.auto task `' + key +
'` has a non-existent dependency in ' +
'` has a non-existent dependency `' +
dependencyName + '` in ' +
dependencies.join(', '));
}
addListener(dependencyName, function () {
Expand Down
2 changes: 1 addition & 1 deletion mocha_test/auto.js
Expand Up @@ -286,7 +286,7 @@ describe('auto', function () {
callback(null, 'task1');
}]
});
}).to.throw();
}).to.throw(/dependency `noexist`/);
done();
});

Expand Down

0 comments on commit d3f583a

Please sign in to comment.