Function sentry_core::test::with_captured_envelopes_options
source ยท pub fn with_captured_envelopes_options<F: FnOnce(), O: Into<ClientOptions>>(
f: F,
options: O,
) -> Vec<Envelope>
Expand description
Runs some code with the default test hub with the given options and returns the captured envelopes.
If no DSN is set on the options a default test DSN is inserted. The
transport on the options is also overridden with a TestTransport
.
This is a shortcut for creating a testable client with the supplied options
and TestTransport
, and bind it to a newly created hub for the duration of
the call.