Advertisement
Guest User

Untitled

a guest
Oct 13th, 2019
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. import React from 'react';
  2. import { shallow } from 'enzyme';
  3. import Counter from './Counter';
  4.  
  5. it('increments count by 1 when the increment button is clicked', () => {
  6. const wrapper = shallow(<Counter />);
  7. const incrementButton = wrapper.find('button.increment');
  8. incrementButton.simulate('click');
  9. const text = wrapper.find('h1').text();
  10. expect(text).toEqual('Value : 1');
  11. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement