-
Notifications
You must be signed in to change notification settings - Fork 1
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
Consider adding babel-plugin-jsx-remove-data-test-id when react is true #49
Comments
We should hide this attributes by default for all node env except test by default , but also provide an option to disable it in cases where e2e testing is used. Also the |
Should consider creating a new environment later on, e.g. |
We should definitely add this to our babel-preset. |
Ooops, sorry 🙏 I was about to mention that we could instead use |
I think this is the best approach |
We are using
data-test-id
attributes as recommended by some testing libraries, such as RTL. However, ideally these attributes should not "leak" to production.Consider adding https://www.npmjs.com/package/babel-plugin-jsx-remove-data-test-id if
NODE_ENV !== 'test'
. One reason to not remove them is if we want to perform e2e testing. We should reflect on this first.The text was updated successfully, but these errors were encountered: