function assert(condition: unknown, message = "assertion failed"): void {
if (!condition) throw new Error(message);
}
import { renderToStaticMarkup } from "react-dom/server";
import ActionBlockerHint from "../src/components/ActionBlockerHint";
const defaultMarkup = renderToStaticMarkup(
);
assert(defaultMarkup.includes("Required action"), "the established default labels remain available");
assert(defaultMarkup.includes("Who can fix it"), "the established actor label remains available");
assert(defaultMarkup.includes("Where to go"), "the established target label remains available");
const localizedMarkup = renderToStaticMarkup(
);
for (const token of [
"i18n:required-action",
"i18n:actor",
"i18n:target",
"i18n:technical-details",
"i18n:diagnostics"
]) {
assert(localizedMarkup.includes(token), `${token} is rendered through the shared blocker contract`);
}
assert(localizedMarkup.includes("tone-danger"), "the consequence tone remains explicit");