# Testing

Use the following command to test all packages in watch mode. Refer to the [Jest CLI options](https://jestjs.io/docs/en/cli#options) for details.

```bash
yarn test:watch
```

In general, this is sufficient during development. CircleCI and Travis will eventually apply a more rigorous set of tests against your pull request, including the ones below.

## Testing the examples

Because React Async is only a piece in a bigger puzzle, testing for integration with other libraries is very important. You can run the tests for all examples against your local changes with the following command:

```bash
yarn test:examples
```

If you want to add integration tests for compatibility with another library, please add an example for it.

## Testing for compatibility

```bash
yarn test:compat
```

This runs all tests using various versions of `react` and `react-dom`, to check for compatibility with older/newer versions of React. This is what CircleCI and Travis run.

## Linting

Use `yarn lint` to verify your code style before committing. It's highly recommended to install the Prettier and ESLint plugins for your IDE. CircleCI and Travis will fail your build on lint errors.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.react-async.com/contributing/testing.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
