Gatsby starter used at Good Praxis. Setup to use TypeScript, SASS (SCSS), Jest and Cypress for testing, and Helmet for SEO.
The Cypress E2E setup contains accessibility and visual regression tests.
Make sure you have gatsby-cli
installed:
npm install -g gatsby-cli
Next, create a new site using this starter:
gatsby new our-site https://github.com/GoodPraxis/gp-gatsby-starter-ts-sass-jest
cd our-site
You can run a development instance by running:
gatsby develop
Remember to update your snapshots when you change things (see below).
To run all tests, use:
npm test
You can run unit tests by running:
npm run test:unit
You can run E2E tests by running:
npm run test:e2e
This will open Cypress in a new window. To run it in CI mode, use:
npm run test:e2e:ci
Jest unit tests will often compare rendered markup with snapshots. If you need to update them after making changes to the markup, run:
npm test -- -u
You can build the website by running:
gatsby build