zpratt/react-tdd-guide
소개
React에서 테스트 주도 개발(TDD)을 적용하는 방법을 보여 주는 예제 모음입니다.
웹 및 앱측정된 스타 증가
- in 24h
- 0
- in 7 days
- -3
- in 15 days
- 기록 수집 중
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
Originalreact-tdd-guide
A series of examples on how to TDD React
Getting started
- install nvm
- Grab an editor or IDE. I recommend Webstorm, Atom, and VIM, in that order.
git clone...nvm install 4OR if v4 of node.js is installed,nvm usenpm i
How to use this guide
Each section is broken out into its own folder, starting with basics. What you'll find there is the finished example. I am experimenting with using the commit history and comments to drive the guide itself. Feedback on whether this works or not would be appreciated.
Each commit that is suffixed with "- red" can be checked out separately to examine the failing test. Each commit that is suffixed with "- green" shows how I finally passed the failing assertion.
Looking at the history for each section will show you only the steps needed to drive that part of the application.
Philosophy
- Avoid the need for runners and browsers
- Achieved by using jest and react-testing-library
Table of Contents
- Basics - Steps for TDD'ing the simplest of React components: An unordered list of items. Start here if you're not familiar with TDD'ing React and want to see a simple introduction.
- Simple event handling (WIP)
- Simple stateful input
- Centralized state management techniques (not done)
- Redux (not done)
- React router (not done)
Running the tests for a section
npm run <section name>
Running all tests
npm test
Contributing
Please feel free to open an issue for:
- A question on how to do something
- A request for further clarification
Use a pull request for
- Suggestions on changing how something is tested
- To add an example you think would be valuable
Caveats
I am not a windows user, therefore this has only been tested on OSX.
관련 프로젝트 살펴보기
불러오는 중…