Category: Testing

Express JavaScript NestJS Testing TypeScript

API with NestJS #9. Testing services and controllers with integration tests

This entry is part 9 of 14 in the API with NestJS

In the previous part of this series, we’ve focused on unit tests. This time, we look into integration tests. In this article, we explain their principles and how they differ from unit tests. We write a few of them using Jest to test our services. We also look into the SuperTest library to test our controllers. […]

JavaScript Testing

JavaScript testing #6. Introduction to End-to-End testing with Cypress

This entry is part 6 of 8 in the JavaScript testing tutorial

So far, we’ve covered quite a lot of different types of tests. Some of them were unit tests or integration tests, where we tested a specific part of our implementation or components working together. In this article, we look into End-to-End testing and perform it using the Cypress framework. The principles of the End to End (E2E) testing The […]

JavaScript React Testing

JavaScript testing #5. Testing hooks with react-hooks-testing-library and Redux

This entry is part 5 of 8 in the JavaScript testing tutorial

The hooks are an exciting addition to React and undoubtedly one that helps us to separate the logic from the template. Doing so makes the above logic more testable. Unfortunately, testing hooks does not prove to be that straightforward. In this article, we look into how we can deal with it using react-hooks-testing-library. Identifying the tricky […]

JavaScript Testing

JavaScript testing #2. Introducing Enzyme and testing React components

This entry is part 2 of 8 in the JavaScript testing tutorial

At the previous part of the tutorial, we’ve briefly covered the basics of unit testing. This time we will go further and start testing React with the Enzyme library. Thanks to the that, your application will be more reliable and it will be easier to avoid regression. Even though we will be using Jest here, Enzyme also works […]

JavaScript Testing

JavaScript testing #1. Explaining types of tests. Basics of unit testing with Jest

This entry is part 1 of 8 in the JavaScript testing tutorial

Hello! Today we start another big series, which is about JavaScript testing. There are various different types of tests and we will start by explaining some of them. In the beginning, we will cover the basics of unit testing, which is testing individual parts of our application and checking if they are fit to use. To […]