mirror of
https://github.com/formbricks/formbricks.git
synced 2026-05-04 03:16:15 -05:00
22 lines
562 B
TypeScript
22 lines
562 B
TypeScript
import { render } from "@testing-library/react";
|
|
import { signOut } from "next-auth/react";
|
|
import { describe, expect, test, vi } from "vitest";
|
|
import { ClientLogout } from "./index";
|
|
|
|
// Mock next-auth/react
|
|
vi.mock("next-auth/react", () => ({
|
|
signOut: vi.fn(),
|
|
}));
|
|
|
|
describe("ClientLogout", () => {
|
|
test("calls signOut on render", () => {
|
|
render(<ClientLogout />);
|
|
expect(signOut).toHaveBeenCalled();
|
|
});
|
|
|
|
test("renders null", () => {
|
|
const { container } = render(<ClientLogout />);
|
|
expect(container.firstChild).toBeNull();
|
|
});
|
|
});
|