Skip to content

Latest commit

 

History

History
23 lines (16 loc) · 1020 Bytes

testing.md

File metadata and controls

23 lines (16 loc) · 1020 Bytes

Testing

Unit tests

yarn test runs the unit test suite.

Our tests are written using Jest.

To write a test, place a Javascript file with the -test.js suffix in the __tests__ directory inside of any subfolder of /src. The test will be automatically picked up by the test runner.

Use deepFreeze to test functions which access redux state. This won't allow the object to be mutated and hence will eventually fail tests in case of mutation.

Functional tests

Functional tests have not been set up. We plan to use Appium.

Linting

yarn test:lint checks the codebase against our linting rules. We're using the AirBnB ES6 and React style guides.

Type checking with Flow

Use Flow and flow-typed to find and prevent type related issues.