MCPcopy Create free account
hub / github.com/hashintel/hash / prepare

Function prepare

libs/error-stack/tests/test_debug.rs:88–110  ·  view source on GitHub ↗
(suffix: bool)

Source from the content-addressed store, hash-verified

86}
87
88fn prepare(suffix: bool) -> impl Drop {
89 setup();
90
91 let mut settings = insta::Settings::clone_current();
92 if suffix {
93 settings.set_snapshot_suffix(snap_suffix());
94 }
95
96 settings.add_filter(
97 r"backtrace no\. (\d+)\n(?: .*\n)* .*",
98 "backtrace no. $1\n [redacted]",
99 );
100 settings.add_filter(
101 r"span trace No\. (\d+)\n(?: .*\n)* .*",
102 "span trace No. $1\n [redacted]",
103 );
104 settings.add_filter(
105 r"backtrace with( (\d+) frames)? \((\d+)\)",
106 "backtrace ($3)",
107 );
108
109 settings.bind_to_scope()
110}
111
112/// Generate the `Report` for:
113///

Callers 15

sources_nestedFunction · 0.70
sources_nested_alternateFunction · 0.70
linearFunction · 0.70
linear_extFunction · 0.70
multiline_contextFunction · 0.70
multilineFunction · 0.70
sourcesFunction · 0.70
sources_transparentFunction · 0.70
complexFunction · 0.70
hookFunction · 0.70
hook_contextFunction · 0.70
hook_for_contextFunction · 0.70

Calls 3

snap_suffixFunction · 0.85
add_filterMethod · 0.80
setupFunction · 0.70

Tested by

no test coverage detected