عرض المشاركات من أبريل, ٢٠٢١

Dependency Injection in TypeScript from scratch using TSyringe

Any language now acknowledges dependency injection as a first-class citizen. Javascript(typescript) has seen a lot of development in recent years. Typescript has risen to the top of the language charts. In this article, I’ll sh…

Mocking- A guide to mock jQuery ajax using Jest

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…

How to mock jQuery selector and return HTML element using JEST

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…

تحميل المزيد من المشاركات
لم يتم العثور على أي نتائج