{"id":13527587,"url":"https://github.com/zivl/sentry-testkit","last_synced_at":"2026-04-01T23:00:31.987Z","repository":{"id":39636900,"uuid":"106317421","full_name":"zivl/sentry-testkit","owner":"zivl","description":"A Sentry plugin to allow Sentry report interception and further inspection of the data being sent","archived":false,"fork":false,"pushed_at":"2026-03-26T20:42:46.000Z","size":4492,"stargazers_count":114,"open_issues_count":15,"forks_count":23,"subscribers_count":194,"default_branch":"master","last_synced_at":"2026-03-27T08:22:45.734Z","etag":null,"topics":["error-handling","error-monitoring","error-reporting","expo","hacktoberfest","raven","raven-js","raven-node","raven-test-kit","react-native","sentry","sentry-io","sentry-node","sentry-react","sentry-react-native","sentry-testkit"],"latest_commit_sha":null,"homepage":"https://zivl.github.io/sentry-testkit/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zivl.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2017-10-09T18:00:52.000Z","updated_at":"2026-03-18T17:21:56.000Z","dependencies_parsed_at":"2023-11-12T21:29:02.547Z","dependency_job_id":"f5f0c449-61fb-49f9-bb52-1cc87933f321","html_url":"https://github.com/zivl/sentry-testkit","commit_stats":{"total_commits":247,"total_committers":27,"mean_commits":9.148148148148149,"dds":0.6720647773279352,"last_synced_commit":"6781f28ad5b1fdf5cdb987271a84a3d3fcbbb442"},"previous_names":["wix/sentry-testkit","wix/raven-testkit"],"tags_count":33,"template":false,"template_full_name":null,"purl":"pkg:github/zivl/sentry-testkit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zivl%2Fsentry-testkit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zivl%2Fsentry-testkit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zivl%2Fsentry-testkit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zivl%2Fsentry-testkit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zivl","download_url":"https://codeload.github.com/zivl/sentry-testkit/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zivl%2Fsentry-testkit/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31292779,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-01T21:15:39.731Z","status":"ssl_error","status_checked_at":"2026-04-01T21:15:34.046Z","response_time":53,"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":["error-handling","error-monitoring","error-reporting","expo","hacktoberfest","raven","raven-js","raven-node","raven-test-kit","react-native","sentry","sentry-io","sentry-node","sentry-react","sentry-react-native","sentry-testkit"],"created_at":"2024-08-01T06:01:52.726Z","updated_at":"2026-04-01T23:00:31.975Z","avatar_url":"https://github.com/zivl.png","language":"TypeScript","readme":"\u003cp align=\"center\"\u003e\n\u003ca href=\"https://npmjs.org/package/sentry-testkit\"\u003e\n    \u003cimg src=\"https://img.shields.io/npm/v/sentry-testkit.svg\" alt=\"npm version\"\u003e\n  \u003c/a\u003e\n\u003ca href=\"https://npmjs.org/package/sentry-testkit\"\u003e\n    \u003cimg src=\"https://img.shields.io/npm/dm/sentry-testkit.svg\" alt=\"npm downloads\"\u003e\n  \u003c/a\u003e\n\u003ca href=\"https://github.com/zivl/sentry-testkit/actions\"\u003e\n    \u003cimg src=\"https://github.com/zivl/sentry-testkit/workflows/Test/badge.svg\" alt=\"Test\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n\u003ca href=\"#\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Compatible%20with%20Sentry-v8-blue\" alt=\"sentry version 8\"\u003e\n  \u003c/a\u003e\n\u003ca href=\"#\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Compatible%20with%20Sentry-v9-blue\" alt=\"sentry version 9\"\u003e\n  \u003c/a\u003e\n\u003ca href=\"#\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Compatible%20with%20Sentry-v10-blue\" alt=\"sentry version 10\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://zivl.github.io/sentry-testkit/\"\u003e\n    \u003cimg alt=\"sentry-testkit\" src=\"./docs/logo/Sentry_github.svg\" height=\"132\"\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\nSentry is an open-source JavaScript SDK published by [Sentry](https://sentry.io/welcome/) to enable error tracking that helps developers monitor and fix crashes in real time.\u003cbr\u003e\nHowever, when building tests for your application, you want to assert that the right flow-tracking or error is being sent to _Sentry_, **but** without really sending it to _Sentry_ servers. This way you won't swamp Sentry with false reports during test running and other CI operations.\n\n## Sentry Testkit - to the rescue\n\n_Sentry Testkit_ enables Sentry to work natively in your application, and by overriding the default Sentry transport mechanism, the report is not really sent but rather logged locally into memory. In this way, the logged reports can be fetched later for your own usage, verification, or any other use you may have in your local developing/testing environment.\n\n## Installation\n\n**npm:**\n```\nnpm install sentry-testkit --save-dev\n```\n**yarn:**\n```\nyarn add sentry-testkit --dev\n```\n\n## Usage\n\n```javascript\n// some.spec.js\nconst sentryTestkit = require('sentry-testkit')\n\nconst {testkit, sentryTransport} = sentryTestkit()\n\n// initialize your Sentry instance with sentryTransport\nSentry.init({\n    dsn: 'some_dummy_dsn',\n    transport: sentryTransport,\n    //... other configurations\n})\n\ntest('collect error events', function () {\n  // run any scenario that eventually calls Sentry.captureException(...)\n  expect(testkit.reports()).toHaveLength(1)\n  const report = testkit.reports()[0]\n  expect(report).toHaveProperty(...)\n});\n\n// Similarly for performance events\ntest('collect performance events', function () {\n  // run any scenario that eventually calls Sentry.startTransaction(...)\n  expect(testkit.transactions()).toHaveLength(1)\n});\n```\n\n## Testkit API\n\nSee full API description and documentation here: https://zivl.github.io/sentry-testkit/\n\n## Running in browser\n\n`sentry-testkit` relies on `express` and `http` packages from NodeJS. We have separated entry `sentry-testkit/browser` where we not include any NodeJS-related code.\n\n```javascript\nconst sentryTestkit = require('sentry-testkit/browser')\n\nconst { testkit } = sentryTestkit()\n// Your code for browser\n```\n\n## Raven-Testkit\nThe good old legacy `raven-testkit` documentation can be found [here](LEGACY_API.md). It it still there to serve `Raven` which is the old legacy SDK of _Sentry_ for JavaScript/Node.js platforms\n\n## Change Log\nWe're constantly and automatically updating our [CHANGELOG](./CHANGELOG.md) file, so its always a good spot to checkout what have we been up to...\n\n## Contribution\nWe'd love any kind of contribution, to get better, improve our capabilities, fix bugs and bring more features as Sentry expanding their tools as well. Please check our [CONTRIBUTING](./CONTRIBUTING.md) guidelines for more info and how to get started.\n\n## License\n\nSentry Testkit is [MIT licensed](./LICENSE).\n","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzivl%2Fsentry-testkit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzivl%2Fsentry-testkit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzivl%2Fsentry-testkit/lists"}