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

Expose sel() #1

Closed
jaredpalmer opened this Issue Mar 19, 2018 · 9 comments

Comments

Projects
None yet
3 participants
@jaredpalmer
Copy link

jaredpalmer commented Mar 19, 2018

React Native Web's testID prop emits data-testid instead of data-test. Would be great if this could be set. Seems like you've already thought about it.

Awesome lib Kent!

@kentcdodds

This comment has been minimized.

Copy link
Owner

kentcdodds commented Mar 19, 2018

Hi @jaredpalmer! Yeah, that'd be fine with me! Feel free to make a PR to allow that to be configurable 👍

@kentcdodds

This comment has been minimized.

Copy link
Owner

kentcdodds commented Mar 19, 2018

Actually, I'm thinking of changing this to the default. Want to open a PR?

@jaredpalmer

This comment has been minimized.

Copy link
Author

jaredpalmer commented Mar 19, 2018

I’m out of office right now/today. Womp womp

@kentcdodds

This comment has been minimized.

Copy link
Owner

kentcdodds commented Mar 19, 2018

I'll go ahead and do it right now 👍

@kentcdodds

This comment has been minimized.

Copy link
Owner

kentcdodds commented Mar 19, 2018

I'm going to go ahead and assume nobody's used the lib yet so I'll push this as a patch release :)

@kentcdodds

This comment has been minimized.

Copy link
Owner

kentcdodds commented Mar 19, 2018

Published 1.0.1

I also updated my blog post about these attributes so it's consistant.

@dnlsandiego

This comment has been minimized.

Copy link
Contributor

dnlsandiego commented Mar 19, 2018

How about expanding the name sel to select? Was reading through the source and found the name confusing at first glance. Only after reading your blog post did I find out what it was short for. I mean it's only going to be 3 characters more 😄.

If you agree, I'd be glad to submit a PR for it.

(Really lovin this library btw. Finally found a testing library with a philosophy I agree and am comfortable with)

@kentcdodds

This comment has been minimized.

Copy link
Owner

kentcdodds commented Mar 19, 2018

That'd be fine with me 👍 It's an internal function anyway so I don't mind renaming it to be more clear. Definitely wont be a breaking change 👍

@kentcdodds

This comment has been minimized.

Copy link
Owner

kentcdodds commented Mar 19, 2018

And by that I mean, yes, I'd love a PR!

julienw pushed a commit to julienw/react-testing-library that referenced this issue Dec 20, 2018

chore: refactor custom matchers (kentcdodds#1)
* Remove unneeded if/else logic in custom matchers

* Use common message format for all custom matchers

* Check html element in toBeInTheDOM
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment