2019-09-11 01:22:28 +00:00
|
|
|
import { expect } from 'chai';
|
|
|
|
|
|
|
|
import { friendlyError } from '../../../src/utils/ajv';
|
|
|
|
|
|
|
|
describe('friendly errors', () => {
|
|
|
|
it('should have a message', () => {
|
|
|
|
const err = friendlyError({
|
|
|
|
dataPath: 'test-path',
|
2019-09-11 13:48:14 +00:00
|
|
|
keyword: 'test',
|
2019-09-11 01:22:28 +00:00
|
|
|
params: { /* ? */ },
|
2019-09-11 13:48:14 +00:00
|
|
|
schemaPath: 'test-path',
|
2019-09-11 01:22:28 +00:00
|
|
|
});
|
|
|
|
expect(err.msg).to.not.equal('');
|
|
|
|
});
|
|
|
|
});
|