Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import dayjs from 'dayjs';
import customParseFormat from 'dayjs/plugin/customParseFormat'
import {AvValidator} from 'availity-reactstrap-validation';
import {inputTypeOverride} from 'availity-reactstrap-validation/AvValidator/utils';
dayjs.extend(customParseFormat);
const fn = AvValidator.dateRange;
const input = {props: {type: 'text'}};
const context = {};
let date0;
let date1;
let date2;
describe('Date Range Validation', () => {
beforeEach(() => {
date0 = dayjs(new Date());
date1 = dayjs(new Date());
date2 = dayjs(new Date());
});
it('should not require a value', () => {
expect(fn('', context, undefined, input)).to.be.true;
});