If you found this while looking for “includes text”, try:
it('should show correct text', () => {
const wrapper = shallow(<MyComponent />);
expect(wrapper.text().includes('my text')).toBe(true);
});
If you found this while looking for “includes text”, try:
it('should show correct text', () => {
const wrapper = shallow(<MyComponent />);
expect(wrapper.text().includes('my text')).toBe(true);
});