Euclid.Assertions.assert_eq

You're seeing just the function assert_eq, go back to Euclid.Assertions module for more information.
Link to this function

assert_eq(left, right, opts \\ [])

View Source

Specs

assert_eq(left :: any(), right :: any(), opts :: assert_eq_opts()) :: any()

Asserts that the left and right values are equal. Returns the left value unless the assertion fails, or if the :returning option is used. Uses assert left == right under the hood, but works nicely in a pipeline.

Options:

  • ignore_order: boolean - if the left and right values are lists, ignores the order when checking equality.
  • returning: value - returns value if the assertion passes, rather than returning the left value.
  • within: delta - asserts that the left and right values are within delta of each other rather than strictly equal.
  • within: {delta, time_unit} - like within: delta but performs time comparisons in the specified time_unit.
    If `left` and `right` are strings, they are parsed as ISO8601 dates.