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.max;
describe('Max Validation', () => {
it('should not require a value', () => {
expect(fn('')).to.be.true;
});
it('should accept input array as an alias for maxChecked', () => {
expect(fn(undefined, undefined, {value: 1}, {value: ['a', 'b']})).to.be.false;
expect(fn(undefined, undefined, {value: 2}, {value: ['a']})).to.be.true;
});
it('should return true if the value is less than the constraint', () => {
expect(fn(1, undefined, {value: 5})).to.be.true;
});
it('should true if the value is the same as than the constraint', () => {