This project uses Gatsby.js.
You will need to create .env.development
and .env.production
files to declare environment variables. These files are ignored by Git.
You will need to set the following environment variables:
GATSBY_RECAPTCHA_SITE_KEY
GATSBY_RECAPTCHA_SECRET_KEY
This is for reCAPTCHA in the contact form, which at the moment is a work in progress. Check Google's documentation for setting up an API key. See reCAPTCHA for more information setting this up.
Once you've set up everything in the previous steps, you are ready to install dependencies by running yarn
, then run a local server using yarn dev
.
Tests are saved as *.test.js
files and are placed near their tested components in a __tests__/
directory.
End-to-end tests are placed at the root in cypress/
.
The libraries used for unit testing are Jest and React Testing Library.
End-to-end testing is done with Cypress. Accessibility is checked using cypress-axe.
yarn test
: Runs tests onceyarn test:watch
: Runs tests in watch modeyarn test:e2e
: Runs end-to-end testsyarn test:coverage
: Displays unit/integration test coverage.