{"id":40448213,"url":"https://github.com/serverless-guru/sls-jest","last_synced_at":"2026-01-20T17:08:05.601Z","repository":{"id":61922051,"uuid":"520236249","full_name":"serverless-guru/sls-jest","owner":"serverless-guru","description":"A collection of matchers and spies for testing AWS serverless applications","archived":false,"fork":false,"pushed_at":"2024-02-08T13:50:40.000Z","size":1515,"stargazers_count":16,"open_issues_count":7,"forks_count":1,"subscribers_count":2,"default_branch":"develop","last_synced_at":"2025-10-14T08:49:47.945Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://serverlessguru.gitbook.io/sls-jest","language":"TypeScript","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/serverless-guru.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":"2022-08-01T19:22:17.000Z","updated_at":"2025-10-06T09:15:18.000Z","dependencies_parsed_at":"2024-02-08T14:51:10.914Z","dependency_job_id":null,"html_url":"https://github.com/serverless-guru/sls-jest","commit_stats":{"total_commits":36,"total_committers":4,"mean_commits":9.0,"dds":"0.41666666666666663","last_synced_commit":"575bbc6e327410e5327bc67778cf6243d251e644"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/serverless-guru/sls-jest","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serverless-guru%2Fsls-jest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serverless-guru%2Fsls-jest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serverless-guru%2Fsls-jest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serverless-guru%2Fsls-jest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/serverless-guru","download_url":"https://codeload.github.com/serverless-guru/sls-jest/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serverless-guru%2Fsls-jest/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28607624,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T16:10:39.856Z","status":"ssl_error","status_checked_at":"2026-01-20T16:10:39.493Z","response_time":117,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2026-01-20T17:08:04.934Z","updated_at":"2026-01-20T17:08:05.593Z","avatar_url":"https://github.com/serverless-guru.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## sls-jest\n\n[![Continuous Integration](https://github.com/serverless-guru/sls-jest/actions/workflows/ci.yml/badge.svg)](https://github.com/serverless-guru/sls-jest/actions/workflows/ci.yml) [![Release](https://github.com/serverless-guru/sls-jest/actions/workflows/release.yml/badge.svg)](https://github.com/serverless-guru/sls-jest/actions/workflows/release.yml)\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"sls-jest.png\" width=\"250\" alt=\"sls-jest logo\"\u003e\n  \n  A jest extension to test serverless applications.\n\u003c/div\u003e\n\n---\n\nTesting serverless applications is hard. Ideally, you want to test against the real infrastrucutre and avoid mocks. e.g. a real DynamoDB table, real Lambda functions. However, the asynchronous nature of serverless makes it difficult to write tests that work and are deterministic.\n\nThis library offers a suite of tools that help solve, or at least mitigate, those issues. It is built on top of the famous [jest](https://jestjs.io/docs/getting-started) library and adds new serverless-related matchers.\n\n# Getting started\n\n## Install sls-jest\n\n```bash\nnpm i sls-jest\n```\n\n## Setup Jest\n\nCreate a setup file:\n\n```typescript\n// setupJest.ts\nimport { matchers } from 'sls-jest';\n\nexpect.extend(matchers);\n```\n\nThen use it in your [jest config file](https://jestjs.io/docs/configuration) (`jest.config.ts`) under `setupFilesAfterEnv`:\n\n```typescript\nexport default {\n  // ..\n  setupFilesAfterEnv: ['./setupJest.ts'];\n}\n```\n\n## Documentation\n\nFor full documentation and guides, read the [documentation website](https://serverlessguru.gitbook.io/sls-jest/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fserverless-guru%2Fsls-jest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fserverless-guru%2Fsls-jest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fserverless-guru%2Fsls-jest/lists"}