Tag: unit testing

Code coverage is a commonly used metric in software engineering, especially in white-box unit testing. It can provide valuable information about how much of the code is tested, especially what is not tested. 100% coverage means that the tests cover 100% of the code. This sounds very good in theory, however, it might not always…

Jasmine JS: A guide to start testing from-scratch The benefits of having automated tests are well known, but setting up any new test framework can be bewildering and time consuming. If you’re writing JavaScript, a language that lies somewhere in the middle between object-oriented and functional programming, understanding what to test can be hard too….

Jest testing: A complete tutorial When it comes to unit testing frameworks for JavaScript, Jest is certainly a serious contender for the #1 spot. Initially, Jest was created by Facebook specifically for testing React applications. It’s one of the most popular ways of testing React components. Since its introduction, the tool has gained a lot…

End-to-end (E2E) testing helps with validating the most important flows in your application, such as user login requests. For front-end development, E2E tests help verify if the correct UI has been presented. For back-end development, E2E tests help verify if an important flow in your back-end services returns the expected output. This post will introduce…

My little self stood in front of my computer some years ago, churning out code that today would make me scream like a baby deprived of food. The motivated me had made some changes to a 1,000-line app the previous night, and now the code just wouldn’t run. If there was anything I remember, it…

Let’s get started with React Native unit testing! A React Native unit is the smallest testable part of a Reactive Native app. What is considered to be the smallest testable part is debatable, and what should be tested is a personal preference, depending on the project. You can perform React Native unit testing on an…

There are many types of automated testing out there: front-end testing, smoke testing, load testing, end-to-end (E2E) testing, and that’s to name only a few. If you want to design a sound testing strategy with the best possible ROI—and who doesn’t want that? It’s crucial to understand all of these types of testing, learning the…

If you’re a front-end developer, you’ve probably heard a lot about the importance of testing your code. Your work is the first thing users see, so even small bugs can torpedo user trust in your brand. But for developers new to working with Angular or testing with Angular, knowing how to start testing can be…

Welcome to the world of JavaScript unit testing. Here, we’ll explore what it means to test your JavaScript application. In this blog post, we’ll explore why and how you should go about testing your JavaScript application. We’ll also explore where exactly these tests should be run and why. Finally, we’ll explore what the tool chain…

Looking to test your JavaScript and/or TypeScript code? Then you could do worse than go for testing with Mocha and Chai. These two libraries are among the most popular tools that developers use to write tests for JavaScript or TypeScript code. But if you’re not familiar with them yet, let me show you how easy…