This series covers testing React Native apps with Jest and Testing Library. In our past tutorial, we went over testing text and a button. In this tutorial, we will go over Testing Styles in your React Native app.
Using Jest and Testing Library with React Native Part IV: Testing a Button
In our last tutorial, we went over how to test for an element/component that is not found. In this tutorial, we will go over adding a button to our React Native codebase. After the button is added, we’ll test it.
Cook Your Own Modal with Styled Components
I created several JavaScript modal dialogs – I always extend a framework modal instead of scratch-coding my own. I thought I knew the things a framework needs to implement in order to present a modal but did I? There was only one way to find out: cook my own JS browser modal, and that is exactly what weโll do in this post.
In this blog, I’ll cover a short approach to hand-coding your own modal with Styled Components. You can find the entire project on GitHub.
Using Jest and Testing Library with React Native Part III: Element Not Found
In the last installment (Part II), we walked through creating and executing our very first test. With that out of the way, let’s move on to something slightly more complicated. Elements that cannot be found typically are elements that are initially hidden. In this post, weโll cover how to test for an element or component that isnโt found.
Refactoring: Ugly Code That Does Everything
If youโve been writing code for a significant amount of time, youโre sure to have seen theโanything but godlyโโGod Method.โ It’s a method that performs way too many processes in the system and has grown beyond all realistic logic to become โThe Method That Does Everything.โ
This single unsightly method can span dozens, if not hundreds, of lines. Sometimes even over 1,000! This type of โugly codeโ is an unbearable beast to maintain. This is why itโs considered a โcode smellโ or anti-pattern.
In this tutorial, we walk through a tangible โGod Methodโ and step through the process to refactor it into something more manageable and human-readable. Our code is written in JavaScript for a Node.js service, but the principles apply to any language.





