Babel plugin for dealing with test ID props in your components
npm install babel-plugin-react-test-idThis plugin removes testID props from your components. It's indented to be run for production/ development builds to prevent test-related data from being included in your bundle.
In
``js`
Out
`js`
`shyarn
yarn add --dev babel-plugin-react-test-id
Usage
$3
.babelrc
`json
{
"plugins": ["react-test-id"]
}
`$3
`sh
babel --plugins react-test-id script.js
`$3
`js
require('babel-core').transform('code', {
plugins: ['react-test-id'],
});
`Options
This plugin accepts an options object with a single option:
props, an array of strings representing the names of props you would like to remove (defaults to ['testID']`).