UNPKG

lucid-ui

Version:

A UI component library from AppNexus.

33 lines 870 B
import { shallow } from 'enzyme'; import React from 'react'; import TimeSelectInput from './TimeSelectInput'; describe('TimeSelectInput', function () { var props = { className: 'hello', value: 2, step: 4, name: 'Dr Who', disabled: false, onChange: jest.fn() }; var component; beforeEach(function () { component = shallow( /*#__PURE__*/React.createElement(TimeSelectInput, props)); }); it('should render an input component with correct props', function () { expect(component.find('input').props()).toEqual({ 'aria-label': 'Dr Who', autoComplete: 'off', className: 'lucid-TimeSelect-time hello', 'data-input': 'true', disabled: false, max: 60, min: -15, name: 'Dr Who', onChange: expect.any(Function), step: 4, type: 'number', value: '02' }); }); });