import React from 'react'; import {shallow} from 'enzyme'; import {PasswordField} from 'app/components/forms'; describe('PasswordField', function() { describe('render()', function() { it('renders', function() { const wrapper = shallow(); expect(wrapper).toMatchSnapshot(); }); it('renders with value', function() { const wrapper = shallow(); expect(wrapper).toMatchSnapshot(); }); it('renders with form context', function() { const wrapper = shallow(, { context: { form: { data: { fieldName: 'foobar', }, errors: {}, }, }, }); expect(wrapper).toMatchSnapshot(); }); }); });