Unit tests are the fundamental beginnings of making sure our function's functions are behaving the way they're expected to. They are really good to run quickly and often. If you're following TDD, unit tests can even help guide you to only write the functionality you need.
Before launching our options for unit testing plugins, let's not forget the most basic way to test our lambda function using the framework, that is, the sls invoke command. We can use the framework to run our function locally, emulating the Lambda environment. The following commands show how we can do this. You can test this on your own function as well:
sls invoke local --function hello
If we had some input data to inject into the event object, ...