diff --git a/src/index.js b/src/index.js index 600b78b..44b2c98 100644 --- a/src/index.js +++ b/src/index.js @@ -1,3 +1,5 @@ const validate = require('./validate'); +const validateError = require('./ValidationError'); module.exports = validate.default; +module.exports.ValidateError = validateError.default; diff --git a/test/api.test.js b/test/api.test.js new file mode 100644 index 0000000..5c0cb80 --- /dev/null +++ b/test/api.test.js @@ -0,0 +1,8 @@ +import schemaUtils from '../src/index'; + +describe('api', () => { + it('should export validate and ValidateError', () => { + expect(typeof schemaUtils).toBe('function'); + expect(typeof schemaUtils.ValidateError).toBe('function'); + }); +});