# `Playwright.Test.Assertions`
[🔗](https://github.com/ftes/playwright_ex/blob/v1.65.0-rc.3/lib/playwright/test/assertions.ex#L1)

ExUnit's `assert/1,2` and `refute/1,2`, each also recorded as an `expect` step of the running
test, as upstream's `expect(value).toBe(...)` is (`Expect "assert"`). Elixir only: upstream's
assertions are its matchers.

`use Playwright.Test` imports them in place of `ExUnit.Assertions`' (with `assert_steps:
false`, ExUnit's own). A helper module opts in with

    import ExUnit.Assertions, except: [assert: 1, assert: 2, refute: 1, refute: 2]
    import Playwright.Test.Assertions

(the first line only if it imports `ExUnit.Assertions`). A library with its own `assert/2`
excludes exactly the arities it defines (`import Playwright.Test.Assertions, except: [assert:
2]`). ExUnit's `refute match?(...)` calls an unqualified `refute(value, expr: ..., ...)`, so a
library's own `refute/2` takes that form too (delegating it to `refute/2` here). It can tell
whether a module has these from `Playwright.Test.Assertions` in `__CALLER__.macros`. See "Assertions" in
`Playwright.Test`.

# `assert`
*macro* 

`ExUnit.Assertions.assert/1`, also a step of the running test (`category: 'expect'`), as
upstream's `expect(value).toBe(...)` is: `Expect "assert"`, with the expression as its
subtitle and its `expression` param. It expands to ExUnit's `assert`, then records the step,
so the assertion binds and fails as ExUnit's (see "Assertions" in `Playwright.Test`).

# `assert`
*macro* 

`ExUnit.Assertions.assert/2`, also a step of the running test, titled by the `message`, as
upstream's `expect(value, message)` is. See `assert/1`.

# `refute`
*macro* 

`ExUnit.Assertions.refute/1`, also a step of the running test: `Expect "refute"`. See `assert/1`.

# `refute`
*macro* 

`ExUnit.Assertions.refute/2`, also a step of the running test, titled by the `message`. See `assert/1`.

---

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