Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
A Next.js template for practicing test-driven development with Cypress, Testing Library, and Jest.
React ATDD Playground is an open-source, Next.js-based project skeleton for deliberately practicing test-driven development (TDD) and front-end testing, created by Codecoolture and promoted through The TDD Workshop.
React ATDD Playground is a template repository that combines a working React application built with Next.js, a full acceptance testing setup using Cypress, and a component-level testing stack built on Testing Library and Jest. It takes a deliberate-practice approach: you clone the skeleton, then write or extend tests the TDD way—red, green, refactor—while having all the infrastructure preconfigured. The template runs on Node.js with yarn scripts, integrates GitHub Actions for continuous integration, and was made by Codecoolture, the team behind The TDD Workshop.
yarn test:acc script to run end-to-end browser tests written in JavaScript against the Next.js app.@testing-library/cypress, @testing-library/react, @testing-library/jest-dom, and @testing-library/user-event to write component-level unit and integration tests with DOM-friendly queries and matchers.yarn test:unit script runs the Jest test suite with the DOM matchers and user-event interactions.main branch.yarn test:all executes all test suites at once, while yarn test:acc:live opens the Cypress interactive runner.yarn lint lints the project with ESLint, matching what most editors already run.yarn dev starts the app locally at http://localhost:3000, with pages and UI components ready for testing.React ATDD Playground is aimed at developers learning or teaching test-driven development in the front-end context. It suits:
After cloning the repository, run yarn install to install dependencies. Three yarn scripts are then available: yarn test:all runs the entire test suite, yarn test:acc executes only the Cypress acceptance tests, and yarn test:unit runs only the Jest and Testing Library component tests. For development, yarn dev starts the app at localhost:3000, and yarn test:acc:live opens the interactive Cypress UI. The README also points to public references and programming katas to structure your TDD practice.
Yes, the template is open-source and hosted on GitHub under the Codecoolture organization. There is no paid tier; you clone or fork it to begin practicing TDD immediately.
The repository includes Cypress for browser-level acceptance tests, Jest as the test runner, and the Testing Library suite (@testing-library/react, @testing-library/cypress, @testing-library/jest-dom, @testing-library/user-event) for component-level tests. Nock is included as an HTTP mocking test double.
Use the yarn test:acc script from the project root. If you want the interactive Cypress interface, run yarn test:acc:live.
Yes, the repo includes an example GitHub Actions workflow that runs both the acceptance and unit test suites. The README shows a workflow badge for the main branch, and you can use that workflow file as a starting point for your own continuous integration.