More tests and fixes

This commit is contained in:
Jonathan Putney
2019-11-14 16:07:42 -05:00
parent caa5977a4b
commit 929176fb3e
14 changed files with 385 additions and 238 deletions

16
test/exceptions.spec.js Normal file
View File

@@ -0,0 +1,16 @@
import {describe, it} from 'mocha';
import {expect} from 'chai';
import {ValidationError} from '../src/exceptions';
describe('Exception Tests', () => {
it('ValidationException should return message string', () => {
expect(
new ValidationError(0).message,
).to.equal('0');
});
it('ValidationException should return errorCode number', () => {
expect(
new ValidationError(0).errorCode,
).to.equal(0);
});
});