it('test keyDown 39', () => {
const props = {
title: 'some title',
history: {
push: jest.fn(),
},
};
const enzymeWrapper = mount(<Layout {...props} />);
enzymeWrapper.simulate('keydown', {
which: 37,
});
expect(props.history.push).toHaveBeenCalledTimes(1);
});
бойлерплейт для react, а не для react-native