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 have not been set up. We plan to use Appium.
yarn test:lint
checks the codebase against our linting rules. We're using
the AirBnB ES6 and
React style guides.
Use Flow and flow-typed to find and prevent type related issues.