{"id":19572990,"url":"https://github.com/erickwendel/testing-serverless-apps","last_synced_at":"2025-04-27T05:32:05.605Z","repository":{"id":229631832,"uuid":"774091515","full_name":"ErickWendel/testing-serverless-apps","owner":"ErickWendel","description":"Code samples of how to make unit and e2e tests in serverless applications","archived":false,"fork":false,"pushed_at":"2024-03-24T23:44:46.000Z","size":335,"stargazers_count":62,"open_issues_count":1,"forks_count":12,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-04-15T04:12:30.435Z","etag":null,"topics":["aws","aws-lambda","aws-s3","continuous-integration","debugging","docker","e2e-testing","github-actions","javascript","jest","localstack","nodejs","serverless","serverless-framework","unit-testing","vscode"],"latest_commit_sha":null,"homepage":"https://youtu.be/rwyhw9UYHkA","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ErickWendel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-03-18T23:35:35.000Z","updated_at":"2024-04-13T16:55:56.000Z","dependencies_parsed_at":"2024-03-25T15:09:53.232Z","dependency_job_id":"d8e472e6-dc10-4ff0-a995-2731e2ee7047","html_url":"https://github.com/ErickWendel/testing-serverless-apps","commit_stats":null,"previous_names":["erickwendel/testing-serverless-apps"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ErickWendel%2Ftesting-serverless-apps","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ErickWendel%2Ftesting-serverless-apps/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ErickWendel%2Ftesting-serverless-apps/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ErickWendel%2Ftesting-serverless-apps/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ErickWendel","download_url":"https://codeload.github.com/ErickWendel/testing-serverless-apps/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224060572,"owners_count":17249046,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","aws-lambda","aws-s3","continuous-integration","debugging","docker","e2e-testing","github-actions","javascript","jest","localstack","nodejs","serverless","serverless-framework","unit-testing","vscode"],"created_at":"2024-11-11T06:31:19.421Z","updated_at":"2024-11-11T06:31:30.557Z","avatar_url":"https://github.com/ErickWendel.png","language":"JavaScript","readme":"# Example of how to run e2e and unit tests on serverless apps using LocalStack and Jest\r\n[![Build Status](https://github.com/ErickWendel/testing-serverless-apps/workflows/Docker%20Actions/badge.svg)](https://github.com/ErickWendel/testing-serverless-apps/actions)\r\n\r\nCode samples of my video on [testing serverless applications](https://youtu.be/rwyhw9UYHkA). \r\n\r\nIt 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.\r\n\r\nNote that it uses **ECMAScript Modules** empowered by **Node.js v20** without any bundlers (NICE).\r\n\r\nLeave your star 🌟 in the project 💚\r\n\r\n- In the ./tests folder I put two examples: [**e2e**](./test/e2e/listBuckets.test.js) and [**unit**](./test/unit/listBuckets.test.js) tests folder and there you can take a look on how to make those tests. \r\n- In [./src/factory.js](./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.\r\n  \r\n## Running\r\n![Testando aplicacnes serverless](https://github.com/ErickWendel/testing-serverless-apps/assets/8060102/41ea502b-8d62-4592-9311-91ae1e269113)\r\n### Pre reqs\r\n\r\n- Install Docker \u0026 Docker-compose\r\n- Install Node.js v20\r\n\r\n### Running\r\n\r\n- run `docker-compose up -d localstack`\r\n- restore node.js dependencies `npm ci`\r\n- run tests `npm t` or press `F5` on VSCode.\r\n\r\n  \r\n\r\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferickwendel%2Ftesting-serverless-apps","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ferickwendel%2Ftesting-serverless-apps","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferickwendel%2Ftesting-serverless-apps/lists"}