-
Notifications
You must be signed in to change notification settings - Fork 407
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve coverage for
AirtableError
interface (#177)
* Improve coverage for `AirtableError` interface * fixup! Improve coverage for `AirtableError` interface
- Loading branch information
1 parent
676dc24
commit b91a452
Showing
2 changed files
with
22 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
// istanbul ignore file | ||
'use strict'; | ||
|
||
function AirtableError(error, message, statusCode) { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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')); | ||
}); | ||
}); | ||
}); |