A small module assembles human-readable labels for notification events. After a recent change, part of the input started being handled inconsistently: on some events the method aborts unexpectedly, and on others it loses expected result elements.
renderAll method must return one string for each input event, in the original order.CommentEvent, the string must be comment:<author>:<text>.ReactionEvent, the string must be reaction:<author>:<emoji>.SystemEvent, the string must be system:<code>.scala REPL or from a small main:import notifications.*
val events = List(
CommentEvent("ira", "ready"),
ReactionEvent("max", "👍"),
SystemEvent("queued")
)
LabelRenderer.renderAll(events)
import notifications.*
LabelRenderer.renderAll(Nil)
ReactionEvent must not cause abnormal termination.3.3.121Use line comments to explain the problem, its impact, the fix and how to test it.