{"id":15392824,"url":"https://github.com/kutyel/babel-plugin-remove-test-ids","last_synced_at":"2025-08-31T23:39:48.631Z","repository":{"id":82597628,"uuid":"105520609","full_name":"kutyel/babel-plugin-remove-test-ids","owner":"kutyel","description":"🐠 Babel plugin to strip `data-test-id` HTML attributes","archived":false,"fork":false,"pushed_at":"2023-03-09T10:26:51.000Z","size":64,"stargazers_count":40,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-28T04:35:00.115Z","etag":null,"topics":["babel","babel-plugin","cypress","e2e","e2e-testing","e2e-tests","javascript-testing","react-testing","selenium","testing","testing-jsx"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kutyel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/funding.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"kutyel"}},"created_at":"2017-10-02T10:01:54.000Z","updated_at":"2025-03-07T02:36:53.000Z","dependencies_parsed_at":"2023-03-27T20:17:41.567Z","dependency_job_id":null,"html_url":"https://github.com/kutyel/babel-plugin-remove-test-ids","commit_stats":{"total_commits":21,"total_committers":4,"mean_commits":5.25,"dds":"0.23809523809523814","last_synced_commit":"27f2e69617dafea929e73395963d6810346bb3d6"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kutyel%2Fbabel-plugin-remove-test-ids","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kutyel%2Fbabel-plugin-remove-test-ids/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kutyel%2Fbabel-plugin-remove-test-ids/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kutyel%2Fbabel-plugin-remove-test-ids/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kutyel","download_url":"https://codeload.github.com/kutyel/babel-plugin-remove-test-ids/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248447317,"owners_count":21105134,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["babel","babel-plugin","cypress","e2e","e2e-testing","e2e-tests","javascript-testing","react-testing","selenium","testing","testing-jsx"],"created_at":"2024-10-01T15:16:18.912Z","updated_at":"2025-04-14T15:41:26.006Z","avatar_url":"https://github.com/kutyel.png","language":"JavaScript","funding_links":["https://github.com/sponsors/kutyel","https://paypal.me/flaviocorpa"],"categories":[],"sub_categories":[],"readme":"# babel-plugin-remove-test-ids\n\n[![Standard - JavaScript Style Guide](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard)\n\n[![NPM version](https://img.shields.io/npm/v/babel-plugin-remove-test-ids.svg?style=flat-square)](https://www.npmjs.org/package/babel-plugin-remove-test-ids)\n[![Build Status](https://img.shields.io/travis/kutyel/babel-plugin-remove-test-ids/master.svg?style=flat-square)](https://travis-ci.org/kutyel/babel-plugin-remove-test-ids)\n[![Coverage Status](https://img.shields.io/coveralls/kutyel/babel-plugin-remove-test-ids.svg?style=flat-square)](https://coveralls.io/github/kutyel/babel-plugin-remove-test-ids)\n[![NPM Status](https://img.shields.io/npm/dm/babel-plugin-remove-test-ids.svg?style=flat-square)](https://www.npmjs.org/package/babel-plugin-remove-test-ids)\n[![Donate](https://img.shields.io/badge/donate-paypal-blue.svg?style=flat-square)](https://paypal.me/flaviocorpa)\n\n\u003e Babel plugin to remove `data-test-id` attributes from the JSX\n\n## Install\n\n```bash\n$ npm install babel-plugin-remove-test-ids --save\n```\n\n## Usage\n\n**.babelrc**\n\n```json\n{\n  \"plugins\": [\"remove-test-ids\"]\n}\n```\n\n... you can also configure it with your attributes!\n\n```json\n{\n  \"plugins\": [\n    [\n      \"remove-test-ids\",\n      {\n        \"attributes\": [\"data-test\", \"data-custom-test-attr\"]\n      }\n    ]\n  ]\n}\n```\n\n## Motivation\n\nIn **React Alicante 2017**, [Forbes Lindsay](https://github.com/ForbesLindesay) gave a [talk](https://github.com/ForbesLindesay/end-to-end-testing-react-applications/blob/master/end%20to%20end%20testing%20react%20applications.pdf) about _\"End to End testing React applications\"_ with [**cabbie**](https://github.com/ForbesLindesay/cabbie) and explained the pattern of adding `data-test-id` props to your components as a good practice for improving testability.\n\n[![video](http://img.youtube.com/vi/veb-xTGZulY/0.jpg)](http://www.youtube.com/watch?v=veb-xTGZulY)\n\nHe also mentioned that it would be _\"fairly easy to do a Babel plugin\"_ to strip those attributes from the actual DOM, if you care enough. :)\n\nAlso, other testing tools like Selenium uses a similar approach and could benefit from this plugin as well!\n\n## License\n\nMIT © [Flavio Corpa](https://github.com/kutyel).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkutyel%2Fbabel-plugin-remove-test-ids","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkutyel%2Fbabel-plugin-remove-test-ids","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkutyel%2Fbabel-plugin-remove-test-ids/lists"}