Guest User

Untitled

a guest
Feb 25th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. import React from 'react'
  2. import { shallow } from 'enzyme'
  3.  
  4. import Counter from './Counter'
  5.  
  6. it('renders correctly', () => {
  7. const wrapper = shallow(<Counter />)
  8. expect(wrapper.find('#btn-test-add')).toHaveLength(1)
  9. expect(wrapper.find('#btn-test-sub')).toHaveLength(1)
  10. expect(wrapper.state('counter')).toBe(0)
  11. })
Add Comment
Please, Sign In to add comment