UNPKG

lucid-ui

Version:

A UI component library from AppNexus.

19 lines (18 loc) 661 B
import React from 'react'; import { common } from '../../util/generic-tests'; import TextFieldValidated from './TextFieldValidated'; import TextField from '../TextField/TextField'; import { shallow } from 'enzyme'; import assert from 'assert'; describe('TextFieldValidated', function () { common(TextFieldValidated); describe('props', function () { it('should pass through props to TextField', function () { var onBlur = function onBlur() {}; var wrapper = shallow( /*#__PURE__*/React.createElement(TextFieldValidated, { onBlur: onBlur })); assert.equal(wrapper.find(TextField).prop('onBlur'), onBlur); }); }); });