Skip to content

Commit

Permalink
Add a test for child wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
koba04 committed Jan 27, 2018
1 parent 311a2c1 commit 398a3fc
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/enzyme-test-suite/test/ShallowWrapper-spec.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4671,8 +4671,11 @@ describe('shallow', () => {
}
}
const wrapper = shallow(<App />);
const p = wrapper.find('p');
expect(wrapper.find('p').text()).to.equal('0');
wrapper.find(Child).prop('onClick')();
// this is still 0 because the wrapper won't be updated
expect(p.text()).to.equal('0');
expect(wrapper.find('p').text()).to.equal('1');
});
});
Expand Down

0 comments on commit 398a3fc

Please sign in to comment.