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

RDEV-6144 [Webpack] Remove data-test-id from production builds #171

Merged
merged 3 commits into from
Jan 5, 2024

Conversation

alvesmiguel1
Copy link
Collaborator

No description provided.

@alvesmiguel1 alvesmiguel1 self-assigned this Jan 3, 2024
@alvesmiguel1 alvesmiguel1 changed the title PoC to remove data-test-id RDEV-6144 [Webpack] Remove data-test-id from production builds Jan 4, 2024
@alvesmiguel1 alvesmiguel1 marked this pull request as ready for review January 4, 2024 15:10
@joaompneves
Copy link
Collaborator

just curious, do you see any relevant performance gains. is there any other rational behind?

* */
export function removeDataTestIdTransformer<T extends TypeScript.Node>(): TypeScript.TransformerFactory<T> {
return context => {
const visit: TypeScript.Visitor = node => {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

small tweak, visitor sounds like a better name

@alvesmiguel1
Copy link
Collaborator Author

just curious, do you see any relevant performance gains. is there any other rational behind?

@joaompneves We might start using data-test-id a lot with the migration of Enzyme to React Testing Library. I don't foresee any visible difference to the user with this change, but I'm afraid that the usage of these will start to grow a lot. Might worth a very few milliseconds in some views 😅

@alvesmiguel1 alvesmiguel1 merged commit ce494a2 into master Jan 5, 2024
9 of 10 checks passed
@alvesmiguel1 alvesmiguel1 deleted the remove-data-test-id branch January 5, 2024 09:13
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.

3 participants