Skip to content

Commit

Permalink
Avoid a var in a test.
Browse files Browse the repository at this point in the history
  • Loading branch information
papandreou committed Jun 9, 2015
1 parent ee13f88 commit f425612
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions test/BeanBag.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,14 +131,11 @@ describe('BeanBag', function () {
});

it('should handle ECONNREFUSED', function () {
var error = new Error('connect ECONNREFUSED');
error.code = 'ECONNREFUSED';

return expect(function (cb) {
new BeanBag({ url: 'http://localhost:5984/' }).request({ path: 'foo' }, cb);
}, 'with http mocked out', {
response: error
}, 'to call the callback with error', socketErrors(error));
response: new socketErrors.ECONNREFUSED('connect ECONNREFUSED')
}, 'to call the callback with error', new socketErrors.ECONNREFUSED('connect ECONNREFUSED'));
});

it('should handle unknown errors', function () {
Expand Down

0 comments on commit f425612

Please sign in to comment.