Code samples of my video on testing serverless applications.
It uses Jest as test runner, LocalStack as a mock server for AWS Services, serverless framework to deploy apps on AWS and GitHub Actions as continuous integration platform.
Note that it uses ECMAScript Modules empowered by Node.js v20 without any bundlers (NICE).
Leave your star 🌟 in the project 💚
- In the ./tests folder I put two examples: e2e and unit tests folder and there you can take a look on how to make those tests.
- In ./src/factory.js you can take a look on how to configure the AWS SDK v3 to point it to localStack when in development mode.
- Install Docker & Docker-compose
- Install Node.js v20
- run
docker-compose up -d localstack
- restore node.js dependencies
npm ci
- run tests
npm t
or pressF5
on VSCode.