© 2023 Hashnode
#unit-testing
When it comes to testing your frontend applications; there are many testing methodologies: unit testing, component testing, integration and end-to-end test. This article focuses on unit and component …
If you have heard of Vite, then you have probably heard of Vitest, the fast unit test framework built from it. In this article, let’s explore what Vitest is, how to use it and why it can be the next t…
The phrase that appears in the subtitle of this post was said by Michael Bolton: The problem is not that the test is the bottleneck. The problem is that you don't know what is in the bottle. That is …
I witness some ways of doing unit tests during my career. I learned all of those from learning a new language and then finding the unit test framework people typically use. Various frameworks teach us…
This article is going to be a series. In each article of the series, I will overview a test category writing about Testing in general, Unit Testing your functions, Unit Testing your service classes for Login & Sign-up, Widget testing and al…
Four rules to ensure your unit tests are following the Single Responsibility Principle — the “S” in S.O.L.I.D. 1. Each Test Has a Single Call to The Production Code The first mistake we can make is to…
Assertion is an important part of testing. It allows you to check that your code is behaving as expected. In this article, we'll look at how to use assertion with the FakeItEasy library. Basic Asserti…
One of the features of FakeItEasy is the ability to specify constraints on arguments passed to mocked methods. This can be useful for testing specific scenarios or edge cases in your code. Using Argum…
Test doubles are objects that are used in place of real objects during testing, allowing developers to isolate and control the behavior of specific parts of their code. One of the key features of Fake…
Previously I created an article about what is unit testing, now let's create one Helper class of a Magento 2 Module Fiko\Testing\Helper\Data and then we're going to create unit testing of that class. …