Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

to.have.text(undefined) does not break the tests #216

Open
vanpacheco opened this issue Jan 17, 2018 · 0 comments
Open

to.have.text(undefined) does not break the tests #216

vanpacheco opened this issue Jan 17, 2018 · 0 comments

Comments

@vanpacheco
Copy link

vanpacheco commented Jan 17, 2018

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.

@vanpacheco vanpacheco changed the title to.have.text(undefined) does not break my tests to.have.text(undefined) does not break the tests Jan 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant