It would be nice to be able to match on text nodes without a parent element
Opened this issue · 0 comments
salomvary commented
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.