{"repo":"zivl/sentry-testkit","free":true,"listed":false,"github":"https://github.com/zivl/sentry-testkit","clone":"git clone https://github.com/zivl/sentry-testkit.git","description":"A Sentry plugin to allow Sentry report interception and further inspection of the data being sent","language":"TypeScript","stars":115,"topics":["raven-test-kit","raven","sentry","sentry-io","raven-js","raven-node","sentry-testkit","error-reporting","error-monitoring","error-handling"],"license":"MIT","category":"ui-components","readme_excerpt":"Test what your app reports to Sentry — without sending anything to Sentry's servers. 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 and swamping your Sentry project with false reports from test runs and CI. Sentry Testkit — to the rescue Sentry Testkit enables Sentry to work natively in your application while running tests: reports are intercepted and logged into memory instead of being sent over the wire. Your tests can then fetch and assert on everything that was (or wasn't) captured: - Errors and messages — captureException , captureMessage , breadcrumbs, tags, extra, user - Performance transactions and spans — names, ops, attributes, span trees - Structured logs — everything sent via Sentry.logger. - Feature flags — which flags were evaluated when an error was captured - Async-safe assertions — built-in waitFor helpers, no sleeps and no flaky tests Installation npm: yarn: Requires Sentry JavaScript SDK v9 or v10 . Using Sentry v8? Stay on sentry-testkit@6 or see the v7 migration guide. Usage More querying power when you need it: Integration modes The custom transport shown above is the most common setup, but the testkit can intercept Sentry traffic in whichever way fits your test environment: Mode Use case ------ ---------- Transport ( sentryTransport ) Unit/integration tests — replaces Sentry's HTTP sender Browser entry ( sentry-testkit/browser ) Same as transport, ","default_branch":null,"files":null,"tree":[],"storefront":"/r/zivl","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/zivl/sentry-testkit/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}