Skip to content

withMatchers

function withMatchers<T>(registry, fn): T;

Defined in: matchers.ts:130

Run fn with registry layered over the global default for the duration of the (synchronous) call; instance matchers shadow global ones of the same name. Restores the previous scope in a finally. Safe because the evaluator never awaits between the scope set and its use.

Type Parameter
T
Parameter Type
registry | MatcherRegistry | undefined
fn () => T

T