Book Image

Jasmine JavaScript Testing Update

By : Paulo Vitor Zacharias Ragonha
Book Image

Jasmine JavaScript Testing Update

By: Paulo Vitor Zacharias Ragonha

Overview of this book

Table of Contents (15 chapters)

Chapter 7. Testing React Applications

As a web developer, you are familiar with the way most websites are built today. There is usually a web server (in languages such as Java, Ruby, or PHP) that processes user requests and responds with markup (HTML).

This means that on every request, the web server interprets the user action through the URL and renders the entire page.

In an attempt to improve the user experience, more and more functionality started to get pushed from the server side to the client side, and JavaScript was no longer simply adding behavior to the page but was rendering it entirely. The biggest advantage was that a user action was no longer triggering a whole page refresh; the JavaScript code could deal with the entire browser document and mutate it accordingly.

Although this did improve the user experience, it started to add a lot of complexity to the application code, which led to increased maintenance costs and the worst—bugs in the form of inconsistencies between different...