(event: HookExecutionEvent)
| 70 | } |
| 71 | |
| 72 | function emit(event: HookExecutionEvent): void { |
| 73 | if (eventHandler) { |
| 74 | eventHandler(event) |
| 75 | } else { |
| 76 | pendingEvents.push(event) |
| 77 | if (pendingEvents.length > MAX_PENDING_EVENTS) { |
| 78 | pendingEvents.shift() |
| 79 | } |
| 80 | } |
| 81 | } |
| 82 | |
| 83 | function shouldEmit(hookEvent: string): boolean { |
| 84 | if ((ALWAYS_EMITTED_HOOK_EVENTS as readonly string[]).includes(hookEvent)) { |
no test coverage detected