Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import {AvValidator} from 'availity-reactstrap-validation';
const fn = AvValidator.maxlength;
describe('Max Length Validation', () => {
it('should not require a value', () => {
expect(fn('')).to.be.true;
});
it('have an alias of maxLength', () => {
expect(fn).to.equal(AvValidator.maxLength);
});
it('should return true if the value length is greater than the constraint', () => {
expect(fn('123', undefined, {value: 5})).to.be.true;
});
it('should true if the value is the same as than the constraint', () => {
expect(fn('12345', undefined, {value: 5})).to.be.true;