Gatsby starter used at Good Praxis
This article discusses the Gatsby starter used at Good Praxis, which is set up to use TypeScript, SASS (SCSS), Jest, Cypress, and Helmet. It also mentions the presence of accessibility tests in the Cypress E2E setup. The article provides instructions for setting up the starter, running a development instance, running tests, updating snapshots, and building the website.
To install the Gatsby starter, follow these steps:
gatsby new my-site https://github.com/goodpraxis/gatsby-starter-goodpraxis
To run a development instance of your site, use the following command:
gatsby develop
To run all tests, use the following command:
npm test
To run unit tests specifically, use the following command:
npm run test:unit
To run E2E tests, use the following command:
npm run test:e2e
If you want to run the E2E tests in CI mode, use the following command:
npm run test:e2e:ci
Jest unit tests in the Gatsby starter often compare rendered markup with snapshots. To update the snapshots after making changes to the markup, run the following command:
npm run test:update-snapshots
To build your website, use the following command:
gatsby build
This article introduces the Gatsby starter used at Good Praxis, which incorporates various useful features such as TypeScript, SASS (SCSS), Jest, Cypress, and Helmet. It provides installation instructions and details on how to run a development instance, perform tests, update snapshots, and build the website. This starter aims to enhance code organization, improve testing capabilities, and optimize SEO with Helmet integration.