LogoLogo
HomeDocsGitHubDiscord
next
next
  • Introduction
  • Getting started
    • Installation
    • Upgrading
    • Usage
    • DevTools
  • API
    • Interfaces
    • Configuration options
    • State properties
    • Helper components
  • Guide
    • Async components
    • Separating view and logic
    • Async actions
    • Optimistic updates
    • Server-side rendering
  • Contributing
    • Introduction
    • Setting up
    • Development
    • Testing
    • Releasing
Powered by GitBook
On this page
  • Testing the examples
  • Testing for compatibility
  • Linting

Was this helpful?

  1. Contributing

Testing

PreviousDevelopmentNextReleasing

Last updated 5 years ago

Was this helpful?

Use the following command to test all packages in watch mode. Refer to the for details.

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:

yarn test:examples

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

Testing for compatibility

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.

Jest CLI options