Next.jsReact启动器

react-atdd-playground — Next.js 启动器模板

作者 codecoolture

一个基于 Next.js 与 React 的练习项目骨架,内置 Cypress 与 Testing Library 测试套件,用于刻意练习测试驱动开发与前端测试。

看看你的网站会是什么样

浏览真实页面截图,比较内容排版与手机效果。点击下方缩略图切换,放大查看整页细节。

1 个预览视图
作者提供的预览
作者提供的预览

来自项目 README 的原始预览。

目前有 1 张原始预览,可打开完整图片查看设计细节。

截图用于了解视觉与布局,交互效果请以实际项目为准。

采集于 2026-10-03查看来源

值得关注的模板亮点

从已有项目资料中,快速了解它的特点。

01

基于 Next.js 与 React 的项目骨架,包含 UI 组件与页面结构

02

集成 Cypress 用于浏览器端验收测试

03

集成 Testing Library 套件用于组件级单元与集成测试

04

引入 Nock 作为 HTTP 测试替身

05

提供 GitHub Actions 工作流示例,运行验收与单元测试

06

提供 yarn 脚本分别执行全部、验收、单元测试及开发与 lint 命令

模板详细介绍

React ATDD Playground 是一个面向测试驱动开发(TDD)练习的启动器模板,使用 Next.js 和 React 构建应用骨架,让练习者可以在包含 UI 组件与页面的真实项目结构中进行测试实践。

项目内置两套测试工具:Cypress 用于浏览器端的验收测试,Testing Library 套件(包括 @testing-library/cypress、@testing-library/react、@testing-library/jest-dom、@testing-library/user-event)用于组件级别的单元与集成测试。此外还引入 Nock 作为 HTTP 测试替身,并提供一个 GitHub Actions 工作流示例,用于运行验收与单元测试套件。

使用方式上,通过 yarn 安装依赖后,可分别运行 yarn test:all、yarn test:acc、yarn test:unit 来执行全部、仅验收或仅单元测试;yarn dev 启动本地应用,yarn test:acc:live 打开 Cypress 交互界面,yarn lint 执行 ESLint 检查。README 还建议结合编程 kata 进行练习,但未提供具体的练习题目或课程内容。

该模板的 MIT 许可覆盖仓库代码,演示图片、字体、图标等第三方素材需单独核对许可;域名、托管等外部服务可能产生额外费用。

Next.jsReact启动器

适合你的项目吗?

适用场景

  • 在真实前端项目结构中刻意练习测试驱动开发
  • 练习使用 Cypress 编写浏览器端验收测试
  • 练习使用 Testing Library 编写 React 组件级测试
  • 使用 Nock 模拟 HTTP 请求进行测试
  • 参考 GitHub Actions 工作流配置持续集成测试

适合人群

  • 希望练习 TDD 或前端测试的开发者
  • 需要包含验收与单元测试示例的前端项目骨架的团队
  • 学习 React 组件测试与 Cypress 验收测试的人员

上手与定制指南

结合仓库当前版本的说明,按下面的资料检查内容、配置与运行要求。

  1. 1

    使用 yarn install 安装依赖

  2. 2

    yarn test:all 运行全部测试,yarn test:acc 仅运行 Cypress 验收测试,yarn test:unit 仅运行 Jest 与 Testing Library 单元测试

  3. 3

    yarn dev 在 http://localhost:3000 启动应用

  4. 4

    yarn test:acc:live 打开 Cypress 交互界面

  5. 5

    yarn lint 使用 ESLint 检查项目

查看仓库使用说明

授权与来源资料

使用条件与限制

免费使用 · 保留许可声明

本次收录的是公开仓库中采用 MIT 许可的免费版本;免费范围为该版本代码,不代表外部服务或第三方素材免费。

使用时需要遵守

  • 允许免费使用、修改、商用和分发该版本代码。
  • 分发代码副本或实质性部分时,保留原作者版权声明和完整 MIT 许可声明。
  • 代码按现状提供;担保与责任限制以原许可证及适用法律为准。

额外费用与待核对事项

  • README 推广 Codecoolture 提供的付费 TDD Workshop 培训服务,属可选外部商业服务,非模板使用所必需。
  • TDD 学习资源托管于外部 Notion 页面,需访问第三方站点,可能受其自身条款约束。
  • 演示图片、字体、图标及其他第三方素材需按各自许可核对,不能仅凭代码的 MIT 许可判断。
  • 域名、托管、数据库、支付或 AI 等外部服务可能另外收费。
查看原文依据

Permission is hereby granted, free of charge

许可证原文

Hire <strong><a href="https://tddworkshop.com" target="blank">The TDD Workshop</a></strong> by <strong><a href="https://codecoolture.com" target="">Codecoolture</a></strong>.

README 原文

If you're starting with TDD, some resources [here](https://www.notion.so/codecoolture/Public-References-50b1e927fe1641748f95610353e97b7f) may help you through the journey.

README 原文
https://github.com/codecoolture/react-atdd-playground/blob/main/LICENSEhttps://github.com/codecoolture/react-atdd-playground/blob/main/README.md

DeepSeek 根据仓库许可证和 README 整理 ·2026-10-03。结果仅覆盖已读取资料,依赖、图片、字体及后续条款变更以各自原文为准。

项目核对记录与介绍依据

模板资料

来源平台
GitHub
资料与维护参考分
资料较完整 · 92 / 100
技术栈
Next.js · React
网站类型
启动器
这个分数如何计算

本站按许可资料(最高30分)、演示链接(12分)、预览图(10分)、Star数(15分)、记录的维护时间(15分)、描述完整度(8分)、功能记录(5分)和分类资料(5分)计算。它不是代码、安全或性能测试,也不是 Google 评分;有链接不代表已实测可用。

这个项目需要核对什么

记录的仓库更新时间
2026-10-02
截图检查日期
2026-10-03

已收录演示链接。请用你的内容与屏幕尺寸检查;有演示不代表表单、认证或支付已经可用。

目录记录的主要技术栈是 Next.js。请通过依赖清单和锁文件核对实际版本与托管要求。这些说明基于收录资料,不代表代码审计或部署实测。

查看具体选型方法 →

介绍的制作与核对状态

介绍由 AI 辅助整理目录与仓库资料。仓库作者不等于这篇介绍的审核者。

审核声明: [email protected] · 2026-10-04

查看当时使用的来源资料

SHA-256: 60d060c2e26012401d1da3335e2c842d5b7d14aaa7f134078bbc1a4531ea7bc6

2026-10-03T16:57:47.456Z

来源文件 / 仓库
<h1 align="center">
  React ATDD Playground (with Next.js) 🎈
</h1>

<div align="center">
  <img src="./.github/tddworkshop.png" width="600" align="center">

  <p>
    Hire
    <strong><a href="https://tddworkshop.com" target="blank">The TDD Workshop</a></strong>
    by
    <strong><a href="https://codecoolture.com" target="">Codecoolture</a></strong>.
  </p>
</div>

## Hi 👋,

Here is a template with a working project skeleton to (deliberate) practice your test-driven development skills (or _just_ front-end testing or front-end development in general).

## 📦 What's in the box?

- A [**React**](https://reactjs.org/) app (with [**Next.js**](https://nextjs.com)): so you can exercise with different kinds of components: UI blocks, pages...
- 🌳 [**Cypress**](https://cypress.io): an acceptance testing framework for browser testing, using JavaScript.
- 🐙 [**Testing Library Suite**](https://testing-library.com/): a complete set of tools for unitary/integration testing at the component level.
  - [**`@testing-library/cypress`**](https://testing-library.com/docs/cypress-testing-library/intro): enhances Cypress with Testing Library-like queries to access the DOM.
  - [**`@testing-library/react`**](https://testing-library.com/docs/react-testing-library/intro): makes React components work with Testing Library.
  - [**`@testing-library/jest-dom`**](https://testing-library.com/docs/ecosystem-jest-dom): expands the default matchers from Jest to be more DOM-friendly.
  - [**`@testing-library/user-event`**](https://testing-library.com/docs/ecosystem-user-event): makes user-like interactions (such as `user.type` or `user.click`) easier to reproduce at the component level.
- 🔴 [**Nock**](https://github.com/nock/nock): a sophisticated HTTP [test double](https://en.wikipedia.org/wiki/Test_double).
- 🔄 [**GitHub Actions**](https://github.com/features/actions): a next-gen continuous integration server. This repository includes an example of a workflow to run the acceptance and unit testing suites: ![github action badge](https://github.com/codecoolture/react-atdd-playground/workflows/test/badge.svg?branch=main)

## How to play?

First, you will need to install the required dependencies. They can be all automatically installed by using [`yarn`](https://yarnpkg.com/):

```sh
$ yarn install
```

Then, there are available three yarn scripts to execute different parts of the test suite:

```sh
$ yarn test:all # it will run all the tests
$ yarn test:acc # it will run only the Cypress test suite
$ yarn test:unit # it will run only the Jest & Testing Library test suite
```

If you're starting with TDD, some resources [here](https://www.notion.so/codecoolture/Public-References-50b1e927fe1641748f95610353e97b7f) may help you through the journey. If you don't know where to start, [programming katas](<https://en.wikipedia.org/wiki/Kata_(programming)>) are a popular mechanism to practice TDD ([here](https://codingdojo.org/KataCatalogue/), you may find some popular ones). Though they are not explicitly targeted for front-end, it should be easy to add a small UI layer on top of them :-)

## Other useful commands

Besides the above testing-focused commands, these may help you during your practice session:

```sh
$ yarn dev # starts the app at http://localhost:3000
$ yarn test:acc:live # opens the Cypress interactive UI
$ yarn lint # lints the project by using ESLint (similar to what your editor probably already does)
```
反馈内容错误

看看同类模板

对比同技术栈与用途的模板,找到更适合的视觉与内容结构。