Skip to content

Commit 398a3fc

Browse files
committed
Add a test for child wrapper
1 parent 311a2c1 commit 398a3fc

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

packages/enzyme-test-suite/test/ShallowWrapper-spec.jsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4671,8 +4671,11 @@ describe('shallow', () => {
46714671
}
46724672
}
46734673
const wrapper = shallow(<App />);
4674+
const p = wrapper.find('p');
46744675
expect(wrapper.find('p').text()).to.equal('0');
46754676
wrapper.find(Child).prop('onClick')();
4677+
// this is still 0 because the wrapper won't be updated
4678+
expect(p.text()).to.equal('0');
46764679
expect(wrapper.find('p').text()).to.equal('1');
46774680
});
46784681
});

0 commit comments

Comments
 (0)