Unit Testing in React: Shallow vs. Static Testing

  • In my course on Unit Testing React Components, I showed you how to use Enzyme, the Airbnb unit-testing library, to unit test React components.
  • Enzyme gives us a couple of different types of ways to render React components.
  • In this video from the course, we’ll look at the difference between shallow rendering and static rendering, and talk about when you might use them.
  • The full course, Unit Testing React Components, goes into much more detail on unit testing React components, which is actually easy to do thanks to React’s functional programming model.
  • We’ll go from the basic setup and writing a test all the way through to full DOM rendering tests.

 In my course on Unit Testing React Components, I showed you how to use Enzyme, the Airbnb unit-testing library, to unit test React components.Enzyme gives us a couple of different types of ways to…

@devstrong: Unit Testing in React #reactjs #angularjs #vuejs #ionic #javascript #100daysofcode #AppDev #Coding #php #nodejs

In my course on Unit Testing React Components, I showed you how to use Enzyme, the Airbnb unit-testing library, to unit test React components.

Enzyme gives us a couple of different types of ways to render React components. In this video from the course, we’ll look at the difference between shallow rendering and static rendering, and talk about when you might use them.

The full course, Unit Testing React Components, goes into much more detail on unit testing React components, which is actually easy to do thanks to React’s functional programming model. We’ll go from the basic setup and writing a test all the way through to full DOM rendering tests.

If you want to see what else you can do with JavaScript, check out the wide range of JavaScript plugins on Envato Market.

Hi! I’m Andrew Burgess, and I’m a connoisseur of all things programming. I’m from near Toronto, Canada, and I’ve been fooling around with computers for nearly my whole life, both hardware and software. Right now, I’m finishing up a computer science degree. For almost a decade now, I’ve been playing around with over a dozen programming languages on several different platforms, from JavaScript to Java, from Ruby to Befunge. My favourite has always been JavaScript. I’ve always enjoyed writing, so when I discovered Tuts+ in 2009, I was excited to start writing tutorials. Since then, I’ve been writing tutorials and producing screencasts for Tuts+. Right now, I’m a course instructor and I produce mostly JavaScript-related courses. Maybe you’ve seen Building a Web App from Scratch with Angular.js or Node.js from Scratch; that’s me! I’ve also written a few ebooks, like Getting Good with Git, Getting Good with JavaScript, and, more recently, Backbone.js Blueprints.

Unit Testing in React: Shallow vs. Static Testing

You might also like More from author

Comments are closed, but trackbacks and pingbacks are open.