(
sessionMatchers: SessionHookMatcher[],
)
| 355 | const result = new Map<HookEvent, FunctionHookMatcher[]>() |
| 356 | |
| 357 | const extractFunctionHooks = ( |
| 358 | sessionMatchers: SessionHookMatcher[], |
| 359 | ): FunctionHookMatcher[] => { |
| 360 | return sessionMatchers |
| 361 | .map(sm => ({ |
| 362 | matcher: sm.matcher, |
| 363 | hooks: sm.hooks |
| 364 | .map(h => h.hook) |
| 365 | .filter((h): h is FunctionHook => h.type === 'function'), |
| 366 | })) |
| 367 | .filter(m => m.hooks.length > 0) |
| 368 | } |
| 369 | |
| 370 | if (event) { |
| 371 | const sessionMatchers = store.hooks[event] |
no outgoing calls
no test coverage detected