Answers for "jest get input value"

1

jest input value

let wrapped = mount(<Component />);
expect(wrapped.find("input").get(0).props.value).toEqual("something");
Posted by: Guest on July-18-2020
0

find value number in enzym

const emailField = orderPageWrapper.find('input[name="email"]')

emailField.simulate('focus')
emailField.simulate('change', { target: { value: '[email protected]', name: 'email' } })
emailField.simulate('blur')
Posted by: Guest on November-13-2020
0

find value number in enzym

const wrapper = mount(<EditableText defaultValue="Hello" />);
const input = wrapper.find('input');

console.log(input.node.value);
Posted by: Guest on November-13-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language