Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TDD / BDD with React.js? [closed]

Really not that much information out there on this subject.

I gather Jest would be the Facebook recommended test environment and obviously there are plenty of other testing frameworks which is irrelevant as I'm trying to obtain a list of TDD/BDD examples in React.js.

Does anyone have tutorials / videos / repos / slides to help others and my self learn how TDD/BDD would be accomplished with React.js?

This Question has been put on hold due to being "off-topic", did feel it would help lots of people and is a very good question but some (non react members) feel that's not the case.

So instead of killing this question off!! I've started a Git Repo and put the list of links we have so far + others that have been contributed on there. If anyone would like to contribute please send PR or add in comments bellow I'll keep adding them to the list.

TDD / BDD React REPO

like image 441
cmdv Avatar asked Jul 10 '15 09:07

cmdv


People also ask

Is TDD possible with React?

Upon completion, you will be able to: Use TDD to develop a React app. Test a React app with Enzyme and Jest. Write and use CSS variables for reuse and responsive design.

Can we use TDD and BDD together?

Short answer, yes.

Is BDD a replacement for TDD?

Not at all. BDD is just a variant of TDD. In TDD, you formulate your requirements as an executable test, then write the production code to fulfill the test.

Is BDD better than TDD?

It's important to note that BDD and TDD aren't mutually exclusive — many Agile teams use TDD without using BDD. However, BDD ensures that most use cases of the application work on a higher level and provide a greater level of confidence.


1 Answers

Those helped me get started:

  • React TDD Guide
  • Using Test Driven Development with React.js to Add Multi-Select to the Drag and Drop Component
  • React TDD Example: Unit Testing and Building a React Component With Jest, Gulp and React Test Utils
  • Testing Flux Applications
  • Awesome React - testing

Also worth looking at Shallow Rendering

like image 101
knowbody Avatar answered Sep 20 '22 14:09

knowbody