Skip to content

Commit

Permalink
Improve coverage for AirtableError interface (#177)
Browse files Browse the repository at this point in the history
* Improve coverage for `AirtableError` interface

* fixup! Improve coverage for `AirtableError` interface
  • Loading branch information
jugglinmike authored Jun 4, 2020
1 parent 676dc24 commit b91a452
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
1 change: 0 additions & 1 deletion lib/airtable_error.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// istanbul ignore file
'use strict';

function AirtableError(error, message, statusCode) {
Expand Down
22 changes: 22 additions & 0 deletions test/airtable_error.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
'use strict';

var AirtableError = require('../lib/airtable_error');

describe('AirtableError', function() {
describe('#toString', function() {
it('includes the provided `error` value', function() {
var error = new AirtableError('value of error parameter');
expect(error.toString()).toEqual(expect.stringContaining('value of error parameter'));
});

it('includes the provided `message` value', function() {
var error = new AirtableError(null, 'value of message parameter');
expect(error.toString()).toEqual(expect.stringContaining('value of message parameter'));
});

it('includes the provided `statusCode` value', function() {
var error = new AirtableError(null, null, 404);
expect(error.toString()).toEqual(expect.stringContaining('404'));
});
});
});

0 comments on commit b91a452

Please sign in to comment.