Book Image

Learning Single-page Web Application Development

Book Image

Learning Single-page Web Application Development

Overview of this book

Table of Contents (15 chapters)
Learning Single-page Web Application Development
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Testing concepts


Let's focus on the two types of tests that will be covered in our sample application: unit testing and e2e testing. A very interesting fact to note here is that previously most of the frontend developers did not worry about tests. Testing was exclusively done by the testing team or quality assurance department. However, the reality has changed now. It is hard to find test teams with even a basic knowledge of JavaScript to perform the necessary tests on SPAs. When I mention test, it means automated testing. The reason why we consider an automated test is that when your application grows from medium to large scale, it will become very complicated to test all interfaces with new implementations.

Currently, frontend developers are more concerned with how to write JavaScript, and how to apply concepts of Test-Driven Development (TDD) and Behavior-Driven Development (BDD).

The following diagram illustrates the workflow of TDD:

The concept of TDD is directly related to the techniques...