Tuesday, November 30, 2021

Can You Refactor JavaScript Safely Without Test Coverage?

Introduction

The conventional wisdom is that you should have good test coverage before refactoring your code. Making mistakes during refactoring will introduce defects in the software if they are not caught during testing. Such regression defects can annoy users, break the software, and even lead to customers abandoning the product.

The need for automated testing is especially high for JavaScript. In a dynamic language with functional constructs like JavaScript, it is harder to detect breakages statically. Additionally, JavaScript has many language details and quirks that are not well known or easy to remember.



from DZone.com Feed https://ift.tt/31dlWBi

No comments:

Post a Comment