# babel-plugin-react-test-id

> Babel plugin for dealing with test ID props in your components

Latest version **1.0.2** (published 2017-06-04) · MIT license · 0 weekly downloads

## Install

```sh
npm install babel-plugin-react-test-id
pnpm add babel-plugin-react-test-id
yarn add babel-plugin-react-test-id
bun add babel-plugin-react-test-id
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2017-06-04 |
| First published | 2017-05-31 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Chris Sauve |
| Maintainers | lemonmade |

## Links

- npm: https://www.npmjs.com/package/babel-plugin-react-test-id
- npm.io page: https://npm.io/package/babel-plugin-react-test-id

## Recent versions

- 1.0.2 (latest) — 2017-06-04
- 1.0.1 — 2017-06-04
- 1.0.0 — 2017-05-31

## README

# babel-plugin-react-test-id

This 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.

## Example

**In**

```js
<MyComponent testID="foo" disabled />
```

**Out**

```js
<MyComponent disabled />
```

## Installation

```sh
# yarn
yarn add --dev babel-plugin-react-test-id

# npm
npm install --save-dev babel-plugin-react-test-id
```

## Usage

### Via `.babelrc` (Recommended)

**.babelrc**

```json
{
  "plugins": ["react-test-id"]
}
```

### Via CLI

```sh
babel --plugins react-test-id script.js
```

### Via Node API

```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']`).

---
_Source: https://npm.io/package/babel-plugin-react-test-id · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
