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 Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
T |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
registry |
| MatcherRegistry | undefined |
fn |
() => T |
Returns
Section titled “Returns”T