Shared ExUnit assertions for adapter contract tests.
These functions use only the public adapter API and canonical Jido.Chat
types. They do not need a provider SDK.
Summary
Functions
Asserts that capability statuses and native callbacks are coherent.
Asserts the normalized result shape for a declared capability.
Asserts JSON-safe serialization and revival for a typed value.
Asserts canonical media fields and returns the media value.
Asserts and returns a stable external message identifier.
Asserts a normalized Jido.Chat.Response result with a message identifier.
Asserts unsupported declarations are coherent without calling provider operations.
Asserts that a webhook request becomes a typed event envelope.
Functions
@spec assert_capability_coherence(module()) :: Jido.Chat.CapabilityMatrix.t()
Asserts that capability statuses and native callbacks are coherent.
Asserts the normalized result shape for a declared capability.
Use this in capability_test/3 blocks after the provider operation runs.
Asserts JSON-safe serialization and revival for a typed value.
@spec assert_media( Jido.Chat.Media.t(), keyword() ) :: Jido.Chat.Media.t()
Asserts canonical media fields and returns the media value.
@spec assert_message_identifier( Jido.Chat.Response.t() | Jido.Chat.Message.t() | Jido.Chat.Incoming.t() ) :: String.t()
Asserts and returns a stable external message identifier.
@spec assert_normalized_response(term()) :: Jido.Chat.Response.t()
Asserts a normalized Jido.Chat.Response result with a message identifier.
@spec assert_unsupported_operations(module()) :: :ok
Asserts unsupported declarations are coherent without calling provider operations.
@spec assert_webhook_event(module(), Jido.Chat.WebhookRequest.t() | map(), keyword()) :: Jido.Chat.EventEnvelope.t()
Asserts that a webhook request becomes a typed event envelope.