Improving Reliability with Testing Tools
Now that we can actually write and build our code for the browser efficiently, it makes sense to also consider verifying the code’s output. Does it really fulfill the given requirements? Has anything changed in terms of the expected outcome? Does the code crash when unexpected values are passed in?
What we need to answer these questions is testing. Testing can mean a lot of things – and depending on who you ask, you’ll get a different answer to the question “What should we test?” In this chapter, we’ll walk through the different options that interest us as developers. We’ll see what tools exist to automate these tests and how we can set them up and use them practically.
We will start our journey into the testing space with a discussion on the beloved testing pyramid. We will then continue by learning about the types of test tools – most notably, pure runners and whole frameworks....