百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
R

react-jest-workshop

> DevOps
开源

[React][React] + [Jest][Jest] + [Enzyme][Enzyme] = :heart: [![slides-badge][slides-badge]][slides] [![PRs Welcome][prs-badge]][prs] [![Dona…

198 stars0 点赞2 次浏览
访问官网GitHub

工具介绍

[React][React] + [Jest][Jest] + [Enzyme][Enzyme] = :heart: [![slides-badge][slides-badge]][slides] [![PRs Welcome][prs-badge]][prs] [![Dona…

React + Jest + Enzyme = :heart:

slides-badge PRs Welcome Donate

Find slides here

This is a workshop for learning how to test React with the Jest testing framework and the Enzyme testing library.

Project Setup

This project assumes you have NodeJS v6 or greater installed. It's also recommended to use the yarn client (rather than npm). If you'd rather stick with npm, that's fine. Just replace yarn with npm in the instructions below and hope that things don't break . You'll also need a recent version of git installed as well.

With that, run:

bash
git clone https://github.com/kentcdodds/react-jest-workshop.git
cd react-jest-workshop
yarn run setup

If the yarn run setup script finishes without errors (don't worry about warnings) then you're good to go. Otherwise, please file an issue.

Testing Instructions

There are two directories in this project that you should be interested in:

  • exercises: Where the unfinished tests are (where you should add your tests).
  • exercises-final: Where the finished tests are (where you can reference if you get stuck).

The tests in exercises are actually all scaffolded for you. So your goal is to go through and write all the tests. Do this:

  1. Run yarn run watch:test which will start running the tests in watch mode, meaning that as you save your file, it will automatically re-run your tests so you can quickly see how you're doing.
  2. Choose a file in the exercises directory that ends in .test.js and implement the tests one-by-one.

Good luck!

LICENSE

MIT

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

JavaScriptkcd-edu

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类DevOps
定价开源

> 相关工具

D
Docker
容器化平台,标准化应用交付
G
GitHub Actions
GitHub 原生 CI/CD 工作流
N
Nginx
高性能 Web 服务器与反向代理