Skip to content

Commit

Permalink
fixes error test (before it was only testing that should can throw …
Browse files Browse the repository at this point in the history
…an error)
  • Loading branch information
jonschlinkert committed Mar 1, 2015
1 parent 05dd4c8 commit e7a2f32
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,12 +191,9 @@ describe('gulp-routes', function() {
});

it('should throw an error when a router is\'t provided.', function (done) {
try {
var routes = gulpRoutes();
return done(new Error('Expected an error to be thrown'));
} catch (err) {
if (!err) return done(new Error('Expected an error to be thrown'));
done();
}
(function () {
gulpRoutes()
}).should.throw('Expected a valid router object.');
done();
});
});

0 comments on commit e7a2f32

Please sign in to comment.