unexpected-react icon indicating copy to clipboard operation
unexpected-react copied to clipboard

It would be nice to be able to match on text nodes without a parent element

Open salomvary opened this issue 5 years ago • 0 comments

Something like this:

        it('finds nested text', () => {

            const component = TestUtils.renderIntoDocument(<div>42</div>);
            return expect(component, 'to contain',
               '42'
            );

        });

Even nicer nicer would be supporting regexes in addition to strings.

salomvary avatar Sep 23 '20 15:09 salomvary