SHARE
TWEET

Untitled

a guest Oct 13th, 2019 91 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. });
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top