Showing posts from April, 2021
In modern programming languages, such as JavaScript and TypeScript, dependency injection (DI) has become a fundamental concept. TypeScript, in particular, has gained significant popularity in recent years, and developers often …
This is my personal favourite tip from the collection. In almost every project, we used an ajax call. Ajax testing is difficult because it is dependent on an external source. In this example, I’ll show you how to use jest to tes…
When you have DOM dependency in your javascript application, you can easily mock the dom elements and return the HTML element. Consider the following code snippet for this example. The CSS class is added and removed based on th…