Skip to content

Instantly share code, notes, and snippets.

View ned-alyona's full-sized avatar
🎯
Focusing

Alyona ned-alyona

🎯
Focusing
View GitHub Profile
@ned-alyona
ned-alyona / (ButtonsToolbar shallow rendering) ButtonsToolbar.js
Last active April 21, 2021 12:26
Unit and Integration Testing of Redux/React Forms
<ButtonsToolbar
onNavigate={[MockFunction]}
onSubmit={[MockFunction]}
onSubmitAndNavigate={[MockFunction]}
store={
Object {
"clearActions": [Function],
"dispatch": [Function],
"getActions": [Function],
"getState": [Function],
@ned-alyona
ned-alyona / (Check datepicker popup open) DateInput.test.js
Last active July 16, 2019 16:39
React components testing with Jest & Enzyme
it('check DatePicker popup open', () => {
const DateComponent = mount(<DateInput />),
dateInput = DateComponent.find("input[type='text']");
dateInput.simulate('click');
expect(DateComponent.find('.react-datepicker')).toHaveLength(1);
});