(value, event, previousEvents)
| 11 | // The `repeated` logic should prevent it most of the times, but it can still |
| 12 | // happen when `value` is not an `Error` instance and contain dynamic content |
| 13 | export const isLimited = (value, event, previousEvents) => { |
| 14 | if (previousEvents.length < MAX_EVENTS || isLimitedWarning(event, value)) { |
| 15 | return false |
| 16 | } |
| 17 | |
| 18 | emitWarning(`${PREFIX} "${event}" until process is restarted.`) |
| 19 | return true |
| 20 | } |
| 21 | |
| 22 | // The `warning` itself should not be skipped |
| 23 | const isLimitedWarning = (event, value) => |
no test coverage detected
searching dependent graphs…