View Source ExUnitExt.Theme behaviour (ExUnitExt v0.1.0-alpha.0)
The default theme for ExUnitExt
.
Summary
Callbacks
Returns the colors map used to format the output.
Returns a boolean indicating if the theme is enabled.
Called by the formatter to print events.
Returns the signs map used to show the results.
Functions
Returns a map with default colors merged with the custom colors in opts
.
Returns a theme module for the given name
or the default theme.
The default print function for ExUnitExt.Theme
.
Returns a printer function for the given theme in opts
.
Returns a map with default signs merged with the custom signs in opts
.
Callbacks
Returns the colors map used to format the output.
@callback enabled?() :: boolean()
Returns a boolean indicating if the theme is enabled.
The default implementation returns IO.ANSI.enabled?()
. If a theme not
enabled the default theme is used.
Called by the formatter to print events.
Returns the signs map used to show the results.
Functions
@spec color_doc(Escape.ansicode(), Inspect.Algebra.t(), map()) :: Inspect.Algebra.t()
Returns a map with default colors merged with the custom colors in opts
.
@spec format(Escape.ansidata(), map()) :: String.t()
Returns a theme module for the given name
or the default theme.
If the name can not be found the default theme is returned and a warning is printed.
@spec indent(String.t() | list(), non_neg_integer()) :: String.t()
The default print function for ExUnitExt.Theme
.
Returns a printer function for the given theme in opts
.
If no theme can be found the default theme is used.
@spec puts(Escape.ansidata(), map()) :: :ok
Returns a map with default signs merged with the custom signs in opts
.
@spec write(Escape.ansidata(), map()) :: :ok