Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
describe('Input', () => {
const createDriver = createDriverFactory(inputDriverFactory);
it('should render', () => {
const value = 'hello!';
const driver = createDriver(<input value="{value}">);
expect(driver.getValue()).toEqual(value);
});
describe('testkit', () => {
it('should exist', () => {
expect(
isTestkitExists(<input>, inputTestkitFactory, {
dataHookPropName: 'data-hook',
}),
).toBe(true);
});
});
describe('Checkbox', () => {
const createDriver = createDriverFactory(checkboxDriverFactory);
it('should be unchecked and not disabled by default', () => {
const driver = createDriver();
expect(driver.isChecked()).toBeFalsy();
expect(driver.isDisabled()).toBeFalsy();
});
it('should be checked', () => {
const driver = createDriver();
expect(driver.isChecked()).toBeTruthy();
});
it('should be disabled', () => {
const driver = createDriver();
expect(driver.isDisabled()).toBeTruthy();
});