-
Notifications
You must be signed in to change notification settings - Fork 49
Unit Tests
After setting up your local environment for the app, you can run all tests with Mocha from the project root.
Some of the tests interact with remote services directly, so you will have to add your API keys to your environment when running the test suite.
DARK_SKY_API_KEY=<key> GOOGLE_API_KEY=<key> npm test
Alternatively you can add the following lines to your ~/.bashrc
file:
export DARK_SKY_API_KEY=<key>
export GOOGLE_API_KEY=<key>
Apply these settings to the current session if necessary:
source ~/.bashrc
Then the test script will always use those keys and you can simply type:
npm test
For automated accessibility testing, the project uses tenon.io. Since this is a paid service, you are not obliged to obtain an API key for local development. The corresponding checks will be skipped if there is no key present.
Tenon.io tests are run during the build after you create a pull request. If you happen to have access to the tenon.io API and want to test locally, add the key to your environment with TENON_API_KEY=.