View Source Nuntiux.Mocker (Nuntiux v1.0.0)

A process that mocks another one.

Summary

Types

@type event() :: %{
  timestamp: integer(),
  message: term(),
  mocked?: boolean(),
  stack: term(),
  with: term(),
  passed_through?: boolean()
}
@type expect_fun() :: ([{:message, term()}] -> expect_fun_result())
@type expect_id() :: reference() | expect_name()
@type expect_name() :: atom()
@type expects() :: %{required(expect_id()) => expect_fun()}
@type history() :: [event()]
@type opts() :: %{
  optional(:passthrough?) => boolean(),
  optional(:history?) => boolean(),
  optional(:raise_on_nomatch?) => boolean()
}