# `A11yAudit.Assertions`
[🔗](https://github.com/angelikatyborska/a11y-audit-elixir/blob/main/lib/a11y_audit/assertions.ex#L1)

ExUnit assertions

# `opts`

```elixir
@type opts() :: [
  filter: module() | nil,
  violations_print_limit: integer() | :infinity,
  nodes_per_violation_print_limit: integer() | :infinity,
  node_html_print_limit: integer() | :infinity
]
```

# `assert_no_violations`

```elixir
@spec assert_no_violations(A11yAudit.Results.t(), opts()) :: nil | no_return()
```

Asserts that the given audit results have no violations.

## Options

- `:filter` - A module implementing the `A11yAudit.ViolationFilter` behavior that will be used to exclude violations matching the filter from the results. Defaults to `nil` (no excluded violations).
- `:violations_print_limit` - The maximum number of violations that will be printed in the error when the assertion fails. Can be an integer or `:infinity`. Defaults to `:infinity`.
- `:nodes_per_violation_print_limit` - The maximum number of nodes that will be printed for each violation when the assertion fails. Can be an integer or `:infinity`. Defaults to 5.
- `:node_html_print_limit` - The maximum length of the HTML snippet that will be printed for each node when the assertion fails. Can be an integer or `:infinity`. Defaults to 100.

---

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