Skip to content

Conversation

@pkuczynski
Copy link

@pkuczynski pkuczynski commented Nov 13, 2019

For the following HTML structure:

<div id="el">123</div>

Such formulated expectation, when called with a number and not a string, will fail because of strict comparison ===

expect($('#el')).to.have.text(123)

My fix ensures that any param for the text() method is converted into a string before comparing it with element text.

@pkuczynski
Copy link
Author

@keithamus and @meeber what you think?

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

Successfully merging this pull request may close these issues.

1 participant