Last updated

How to test FTW

This guide describes how to use the test setup in Flex Template for Web (FTW).

The test setup is based on the create-react-app test setup and is using the Jest testing framework. For reference, see the testing section in the create-react-app documentation.

Running tests

To start the test watcher that automatically updates when files change, run

yarn test

If you want to run the tests once and not start the watcher, run

CI=true yarn test

Note that this also runs the linter.

Note: In some environments, alternative test watcher doesn't always work and it can die unexpectedly. If that happens to you, you might want to install Watchman. Read more about this issue.

Jest

To learn more about testing with Jest, read the following documentation: