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.maxChecked;
describe('Max Checked Validation', () => {
it('should not require a value', () => {
expect(fn('')).to.be.true;
});
it('have an alias of maxChecked', () => {
expect(fn).to.equal(AvValidator.maxChecked);
});
it('should return false if the value is greater than the constraint', () => {
expect(fn(undefined, undefined, {value: 1}, {value: ['a', 'b']})).to.be.false;
});
it('should return true if the value is the same as the constraint', () => {
expect(fn(undefined, undefined, {value: 2}, {value: ['a', 'b']})).to.be.true;
it('have an alias of maxChecked', () => {
expect(fn).to.equal(AvValidator.maxChecked);
});