Chapter 3
Testing Your JavaScript
IN THIS CHAPTER
Using ESLint
Debugging JavaScript in Chrome
Testing with Jest
Testing React components
“Testing — we will never do enough of it.”
—GREG LEMOND
Testing is considered the fourth phase of the systems development life cycle (SDLC), but it starts much earlier in the process. In fact, testing is an important tool throughout the software development process. You might start your journey as a programmer by doing only informal and ad hoc manual testing — for example, opening the application and clicking around to see whether it works. Or you might put a console.log
statement in your code to check the value of a variable.
As your programming skills mature, you'll use tools that will make your testing easier or even allow you to make fewer mistakes in the first place.
A professional developer must always be considering testing and should make use of an automated testing framework to make tests repeatable. Automated testing has many benefits, from ensuring that the new code works to testing that it doesn't break something else and even to planning ...
Get JavaScript All-in-One For Dummies now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.