# `StatifierUI.Fixtures.ExpectationError`
[🔗](https://github.com/riddler/statifier-ui/blob/v0.11.0/lib/statifier_ui/fixtures/expectation_error.ex#L1)

Raised by `StatifierUI.Fixtures.Expectations.check!/2` when one or more
stated `expect` entries did not hold.

A plain exception, not `ExUnit.AssertionError` - nothing under `lib/` may
depend on `ExUnit` being loaded, the same optional-dependency discipline
applied to `Kino` and `Phoenix.LiveView`. A host wires `check!/2` into its
own `ExUnit` test and lets this exception's message do the reporting.

# `t`

```elixir
@type t() :: %StatifierUI.Fixtures.ExpectationError{
  __exception__: true,
  message: String.t(),
  results: [StatifierUI.Fixtures.Expectations.result()]
}
```

# `exception`

```elixir
@spec exception([StatifierUI.Fixtures.Expectations.result()]) :: t()
```

Builds the exception from the failing `results` (as returned by
`StatifierUI.Fixtures.Expectations.check/2`), formatting one line per
failure naming its expression, dataset, expected value, actual value, and
error.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
