# react-select-test-utils

> Helper functions for testing JedWatson's react-select component

Latest version **1.0.2** (published 2016-11-29) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-select-test-utils
pnpm add react-select-test-utils
yarn add react-select-test-utils
bun add react-select-test-utils
```

## 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 | 2016-11-29 |
| First published | 2016-11-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Nat Budin |
| Maintainers | plm_engineers |

## Links

- npm: https://www.npmjs.com/package/react-select-test-utils
- Repository: https://github.com/patientslikeme/react-select-test-utils
- Homepage: https://github.com/patientslikeme/react-select-test-utils#readme
- Issues: https://github.com/patientslikeme/react-select-test-utils/issues
- npm.io page: https://npm.io/package/react-select-test-utils

## Recent versions

- 1.0.2 (latest) — 2016-11-29
- 1.0.1 — 2016-11-28
- 1.0.0 — 2016-11-28

## README

# react-select-test-utils

[![Build Status](https://travis-ci.org/patientslikeme/react-select-test-utils.svg?branch=master)](https://travis-ci.org/patientslikeme/react-select-test-utils)
[![Code Climate](https://codeclimate.com/repos/583c5ccd17469900810001e3/badges/953c521a770b5fc9e7bc/gpa.svg)](https://codeclimate.com/repos/583c5ccd17469900810001e3/feed)

Helper functions for testing [JedWatson's react-select component](https://github.com/JedWatson/react-select)

## API

`search(select, queryString, callback)`

Executes a search in a react-select component and then calls a given callback function.

Parameters:

* `select` - an Enzyme wrapper containing the react-select component to search in
* `queryString` - the query to type into the component
* `callback` - a function to call once the search completes

`chooseOption(select, optionText)`

Chooses an option currently being displayed by a react-select component.

Parameters:

* `select` - an Enzyme wrapper containing the react-select component to choose from
* `optionText` - the label of the option to choose

`chooseOptionBySearching(select, queryString, optionText, callback)`

Executes a search in a react-select component, chooses an option once the results come back, and calls a callback function after choosing the option.

Parameters:

* `select` - an Enzyme wrapper containing the react-select component to search in and choose from
* `queryString` - the query to type into the component
* `optionText` - the label of the option to choose
* `callback` - a function to call once the search completes and the option is chosen

## License

react-select-test-utils is (c) 2016 PatientsLikeMe, Inc. and is released under the terms and conditions of the MIT License.  See the LICENSE file for details.

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