Python is a multi-purpose language that is used for everything backend. In this article, I will teach you to perform basic unit testing in Python, how to mock modules, and make sure your code is clean.
read more “Unit-testing in Python: If You Do Not Test Your Code, No One Will”Tag: testing
Create Custom Jest Matchers to Test Like a Pro
Jest is an industry-standard testing framework for JS projects. It was developed by Facebook to test their code and was made open-source. In this article, I will teach you to create custom Jest matchers to supercharge your testing skills.
read more “Create Custom Jest Matchers to Test Like a Pro”Advanced testing in React Native with Jest: Components
This post is part of my series on unit testing with Jest in React Native. You can find the introduction here.
In the previous parts, I went through why unit testing is vital and how to test your components using snapshots. While snapshot testing is effective, it fails to test some aspects of the component. Now I would like to talk about more advanced component testing in react native.
read more “Advanced testing in React Native with Jest: Components”Advanced testing in React Native with Jest: Mocking
This post is part of my series on unit testing with Jest in React Native. You can find the introduction here.
While unit testing your code with Jest, you may come across a time when you have to emulate a certain function. For example, the fetch function that performs HTTP requests, or some hardware-related routines. In such cases, you have to use mocking. Thankfully, jest supports various mocking styles out of the box.
read more “Advanced testing in React Native with Jest: Mocking”Testing React Native apps with Jest
React Native allows developers to develop mobile applications easily, and that means testing is more important than ever. You should test the code you write for a number of reasons, most importantly, to ensure that it actually works. In this article, I will explain some principles of unit testing and show you how it is done in React Native.
read more “Testing React Native apps with Jest”