React Front-End Testing


Hi, everyone! I'm Glory, the most beautiful hacker of all allocateam's hackers ๐Ÿ‘ฏ

In this post, I want to share about what I have done in the beginning of the first sprint. For my very first task, I decided to choose to learn about front-end testing to support the TDD implementation for our development ahead.

allocateam's front-end system will be developed using React JS in React Boilerplate architecture. There are 2 main testing supported by Boilerplate that make us easier to test our front-end things. First, Unit Testing using Jest. This test can be used for the practice of testing the smallest possible units of our code and functions. We run this test to verify that our functions do the thing we expect them to do. Unit Testing is very useful to test Redux actions and reducers. 

Due to we talk about full scope of front-end development, beside of testing our functions, we need to test about the component we create. That's the reason why we need the next kind of testing, that is, Component Testing. We can use shallow rendering and enzymes, that also supported by Boilerplate. We use them to make sure that every component needed are available on the view layer of our application.

For more technical things about how to implement those tests, go visit the official repository of React Boilerplate here: https://github.com/react-boilerplate

All of those tests will be very helpful for our front-end development process for sure. Due to using TDD approach, don't forget to always Test First ๐Ÿ˜‡


That's all from me. See you on another post!

0 komentar:

Post a Comment