# `Jido.Chat.AdapterTestKit`
[🔗](https://github.com/agentjido/jido_chat/blob/v1.2.0/lib/jido/chat/adapter_test_kit.ex#L1)

Reusable ExUnit support for independent `Jido.Chat.Adapter` packages.

Use this module in an adapter test module. It adds baseline tests for the
capability matrix and stable unsupported results. It also imports the
canonical factories and shared assertions.

    defmodule MyAdapter.ConformanceTest do
      use Jido.Chat.AdapterTestKit, adapter: MyAdapter, async: true
    end

Provider-specific tests can use `capability_test/3`. The test body runs only
when the adapter declares the capability as `:native` or `:fallback`.

# `__using__`
*macro* 

```elixir
@spec __using__(keyword()) :: Macro.t()
```

Adds provider-free adapter conformance tests and shared test helpers.

# `capability_test`
*macro* 

```elixir
@spec capability_test(atom(), String.t(), keyword()) :: Macro.t()
```

Defines a provider test that runs only when the adapter supports a capability.

    capability_test :edit_message, "normalizes the provider edit result" do
      result = Jido.Chat.Adapter.edit_message(@adapter, "room", "message", "new text")
      assert_capability_result(@adapter, :edit_message, result)
    end

# `supported?`

```elixir
@spec supported?(module(), atom()) :: boolean()
```

Returns true when a capability is native or has a core fallback.

---

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