Module Mock_sink.Pattern

Describes an event pattern to search for in the sink.

type t = {
  1. level : Mavryk_event_logging.Internal_event.level option;
  2. section : Mavryk_event_logging.Internal_event.Section.t option option;
  3. name : string;
}

An event pattern to search the sink for. Checks for the event's name, and optionally also for level and section. Passing None as each of these fields results in that field not being checked.

val match_event : t -> event -> bool

Returns true if event matches the pattern; false otherwise.

val assert_event : t -> event -> unit

An Alcotest assertion that event matches the pattern.