O'Reilly logo

JavaScript at Scale by Adam Boduch

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Unit testing tools

It's time to turn our attention to testing, having covered the basics of mocking API endpoints at scale. Our ability to mock APIs is highly relevant to testing our code, because we can test against those same mocks, or at least the same data. This means that if our tests fail, we can start interacting with the UI if we need to, using the same data that failed the test, trying to figure out what's happening.

We'll look into using the unit testing tools that ship with JavaScript frameworks, and figure out where their value lies. We'll also look at using more generic standalone testing frameworks that run with any code. We'll close out the section with a look at how our tests can be automated, and how this automation fits into our ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required