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

Incorrectly ignores 0 as a value #23

Closed
chriskrycho opened this issue Sep 27, 2016 · 1 comment
Closed

Incorrectly ignores 0 as a value #23

chriskrycho opened this issue Sep 27, 2016 · 1 comment
Labels

Comments

@chriskrycho
Copy link
Contributor

To reproduce:

testSelector('foo', 0);

The expected value is [data-test-foo="0"]. The actual value is [data-test-foo].

Workaround: convert to a string:

testSelector('foo', `${0}`);

I ran into this because I have a small helper that wraps this and passes in an ID, so:

mySelector = id => testSelector('foo', id);

This works normally, unless the id is 0.

@marcoow marcoow added the bug label Sep 28, 2016
@marcoow
Copy link
Member

marcoow commented Sep 28, 2016

Thanks for reporting - should be pretty easy to fix if you (or anyone) wants to submit a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants