Co-authored-by: Jason Woltje <jason@diversecanvas.com> Co-committed-by: Jason Woltje <jason@diversecanvas.com>
28 lines
977 B
TypeScript
28 lines
977 B
TypeScript
import { describe, it, expect } from "vitest";
|
|
import { render, screen } from "@testing-library/react";
|
|
import { AuthDivider } from "./AuthDivider";
|
|
|
|
describe("AuthDivider", (): void => {
|
|
it("should render with default text", (): void => {
|
|
render(<AuthDivider />);
|
|
expect(screen.getByText("or continue with")).toBeInTheDocument();
|
|
});
|
|
|
|
it("should render with custom text", (): void => {
|
|
render(<AuthDivider text="or sign up" />);
|
|
expect(screen.getByText("or sign up")).toBeInTheDocument();
|
|
});
|
|
|
|
it("should render horizontal divider lines", (): void => {
|
|
const { container } = render(<AuthDivider />);
|
|
const lines = container.querySelectorAll("[aria-hidden='true'].h-px");
|
|
expect(lines.length).toBe(2);
|
|
});
|
|
|
|
it("should apply uppercase styling to text", (): void => {
|
|
const { container } = render(<AuthDivider />);
|
|
const textWrapper = container.querySelector(".uppercase");
|
|
expect(textWrapper).toBeInTheDocument();
|
|
});
|
|
});
|