Skip to content

Commit

Permalink
Add a test
Browse files Browse the repository at this point in the history
  • Loading branch information
dmarchena committed May 24, 2015
1 parent e5e54df commit e205e3e
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions test/scenarios/bower/index.js
Expand Up @@ -74,10 +74,9 @@ describe('DependencyTree in Bower:', function () {
});
});

it('should throw an Error with a unsupported manager', function (done) {
it('should fail the promise with an unsupported manager', function (done) {
dependencyInfo.readTree({
path: searchRootPath,
//type: ['devDependencies'],
manager: 'foo'
})
.catch(function (err) {
Expand All @@ -86,6 +85,19 @@ describe('DependencyTree in Bower:', function () {
});
});

it('should throw an Error with a unsupported manager', function (done) {
var tree;
try {
tree = dependencyInfo.readTreeSync({
path: searchRootPath,
manager: 'foo'
});
} catch(err) {
(err.message).should.startWith('Unknown manager');
done();
}
});

});

}());

0 comments on commit e205e3e

Please sign in to comment.