Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
A Gatsby starter with configured testing frameworks and tools for each layer of the Test Pyramid.
Gatsby Testing Starter is a boilerplate Gatsby starter that ships with preconfigured testing tools for every layer of the Test Pyramid, from Jest unit tests to Cypress end-to-end and visual regression tests.
Gatsby Testing Starter is an open-source Gatsby starter created by DanailMinchev. It takes a blank Gatsby site and produces a project already wired with Jest, React Testing Library, Cypress, axe, Storybook, and image-snapshot tooling, along with CI/CD configuration. It runs on Gatsby, the React-based static site generator, and is installed with the gatsby new CLI command using the GitHub repository URL.
netlify.toml and npm scripts for local Netlify dev (npm run develop:netlify), live share, and deployments to preview, UAT, and production URLs.CODECOV_TOKEN GitHub secret; FOSSA is configured for dependency license scanning.npm run commit starts an interactive prompt.test:e2e:docker and test:visual:docker commands run Cypress and Storybook/Puppeteer inside Docker for consistent screenshots across machines; macOS users run . docker/setupXQuartz.sh first for the Cypress Test Runner GUI..storybook config directory and a stories directory are set up for writing component stories used by both Storybook and automated visual tests.npm run test or in watch mode with npm run test:watch, and update Jest snapshots via npm run test:update.npm run test:e2e after npm run build, or in dev mode with hot reloading via npm run test:e2e:dev.npm run test:visual to catch pixel-level UI regressions with jest-image-snapshot.After installing the starter with gatsby new, you run npm ci to install dependencies. Unit and structural tests run with npm run test; end-to-end, accessibility, and visual tests require building the project first with npm run build, then running npm run test:e2e or npm run test:visual. Snapshot updates are available through the :update variants of each command. GitHub Actions workflows trigger CI on push/pull requests, and the Release workflow publishes a new release and deploys to Netlify UAT.
main_build_environment and pr_build_environment); Docker e2e commands are macOS-only for the Test Runner GUI and require XQuartz configuration; the full test suite needs a Gatsby build before Cypress and visual tests can run.Gatsby Testing Starter is free and open source under the MIT license.
Jest with React Testing Library for unit tests, Jest snapshot testing for structural tests, Cypress with Cypress Testing Library for end-to-end tests, axe with cypress-axe for accessibility, and Storybook with jest-puppeteer and jest-image-snapshot plus Cypress Image Snapshot for visual regression testing.
Use npm run test:update for Jest snapshots, npm run test:e2e:update for Cypress image snapshots, and npm run test:visual:update for Storybook image snapshots. Docker variants append :docker e.g., npm run test:visual:docker:update.
Docker is optional but recommended for automated visual testing because it keeps browser and font rendering consistent. The repo includes docker/ scripts and Dockerfiles; test:e2e:docker and test:visual:docker commands are provided. On macOS, running Cypress in Docker requires XQuartz for the Test Runner GUI.
Yes. netlify.toml is included, but the build/deploy process is driven by GitHub Actions workflows rather than Netlify Build. You must set up NETLIFY_AUTH_TOKEN and NETLIFY_SITE_ID secrets, and stop Netlify builds to avoid double deployment.
