Throw message for ValidationExceptions
This commit is contained in:
committed by
Jonathan Putney
parent
7b92c65061
commit
67bf600c52
@@ -5,12 +5,12 @@ import {ValidationError} from '../src/exceptions';
|
||||
describe('Exception Tests', () => {
|
||||
it('ValidationException should return message string', () => {
|
||||
expect(
|
||||
new ValidationError(0).message,
|
||||
).to.equal('0');
|
||||
new ValidationError(0, 'Error Message').message,
|
||||
).to.equal('Error Message');
|
||||
});
|
||||
it('ValidationException should return errorCode number', () => {
|
||||
expect(
|
||||
new ValidationError(0).errorCode,
|
||||
new ValidationError(0, 'Error Message').errorCode,
|
||||
).to.equal(0);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user