Skip to content

Commit

Permalink
Use simpler way of testing for thrown exception
Browse files Browse the repository at this point in the history
  • Loading branch information
watson committed Aug 7, 2014
1 parent 6351561 commit eb48422
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,10 @@ test('should not require a prefix', function (t) {
});

test('should require key/secret', function (t) {
var failed = false;
try {
var fn = function () {
nodes3('s3://bucket.s3.amazonaws.com');
} catch (e) {
failed = true;
}
t.ok(failed, 'did throw exception');
t.throws(fn, 'S3 key and secret are required!');
t.end();
});

Expand Down

0 comments on commit eb48422

Please sign in to comment.