to.have.text(undefined) does not break the tests
vanpacheco opened this issue · 0 comments
vanpacheco commented
I am not sure whether this is an issue, but I do think this behavior is inconvenient. For instance, the following test passes:
it('has text', () => {
const test = shallow(<span>Test</span>);
expect(test).to.have.text(undefined);
});
I'd appreciate any light you shed on why this is happening or on whether this is an issue at all.