refactor(app): migrate small styles to tailwind
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
import { renderToStaticMarkup } from "react-dom/server";
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
import { AuthErrorMessage } from "../auth-error-message";
|
||||
|
||||
describe("auth Tailwind components", () => {
|
||||
it("renders AuthErrorMessage only when a message is present", () => {
|
||||
expect(renderToStaticMarkup(<AuthErrorMessage message={null} />)).toBe("");
|
||||
|
||||
const html = renderToStaticMarkup(<AuthErrorMessage message="Invalid email" />);
|
||||
expect(html).toContain('role="alert"');
|
||||
expect(html).toContain("text-error");
|
||||
expect(html).toContain("Invalid email");
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user