Setting up unit tests

As I mentioned in the prior section, there are a few tricks and tips in setting up unit tests with a serverless system. The most important thing you can do is completely isolate your application code from the fact that it is running in a serverless context or within a given cloud provider. This strategy will lend other significant benefits other than making our tests easier to run, and I'll discuss those advantages in the course of this discussion on testing.

Get Serverless Design Patterns and Best Practices 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.