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
endProvider-specific tests can use capability_test/3. The test body runs only
when the adapter declares the capability as :native or :fallback.
Summary
Functions
Adds provider-free adapter conformance tests and shared test helpers.
Defines a provider test that runs only when the adapter supports a capability.
Returns true when a capability is native or has a core fallback.
Functions
Adds provider-free adapter conformance tests and shared test helpers.
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
Returns true when a capability is native or has a core fallback.