react-testing-library icon indicating copy to clipboard operation
react-testing-library copied to clipboard

Documentation missing on getByText matching strategy

Open EmilOJ opened this issue 8 years ago • 2 comments

It should be clear that getByText does not match when there are leading or trailing words in the text. I spend two hours trying to debug why foo did not match foo bar. I admit I got a mislead by a lot of react and relay stuff, but you should consider including a simple sentence about this :)

Love this library, btw

EmilOJ avatar May 26 '18 10:05 EmilOJ

@EmilOJ Have you seen the documentation for getByText in section textmatch? https://github.com/kentcdodds/react-testing-library#textmatch

Please let us know how to make that point more clear :) thx

johann-sonntagbauer avatar May 26 '18 11:05 johann-sonntagbauer

I don't know why I didn't see this. No issue here! Thanks

EmilOJ avatar May 26 '18 11:05 EmilOJ