Ask AI is now on the home page — ask a question and get a sourced answer from the Ory docs. You'll also find it in the bottom-right corner of any page.

Skip to main content

messageTestId()

function messageTestId(message: {
id: string | number;
}): {
data-testid: string;
};

Helper function to generate a test id for a UiText message.

Parameters

ParameterTypeDescription
message{ id: string | number; }the UiText message to generate a test id for
message.idstring | number-

Returns

{
data-testid: string;
}

a unique, stable test id for the message

NameType
data-testidstring