Designing a Testable Router

Although there are some exceptions, it’s generally not possible to run AWS services on your local workstation. With all of our application’s back end running in AWS, you might be worried that it will be difficult to test. If we want to create a fast feedback loop that tells us if things are working, we’re going to need to diverge from the traditional approach of running a complete service stack in a development environment in order to test the application while we build it. Instead, we’re going to test our router using unit tests written with a test first approach. Designing the router by writing the tests first will ensure the resulting design is easy to test. Although our focus on testing will be limited to this ...

Get Serverless Single Page Apps 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.