glowing-fiesta-original/tests/shared/utils/auth-client.test.ts
Liviu Burcusel ab10b3903a
All checks were successful
Production PR / QA Tests (pull_request) Successful in 42s
Improved code coverage
2026-01-12 14:22:03 +01:00

23 lines
591 B
TypeScript

import { describe, expect, it, vi } from "vitest";
import { authClient } from "#shared/utils/auth-client";
import { createAuthClient } from "better-auth/vue";
const vars = vi.hoisted(() => ({
mockAuthClient: {
signIn: vi.fn(),
signUp: vi.fn(),
signOut: vi.fn(),
},
}));
vi.mock("better-auth/vue", () => ({
createAuthClient: vi.fn(() => vars.mockAuthClient),
}));
describe("auth-client utility", () => {
it("should create and export the auth client", () => {
expect(createAuthClient).toHaveBeenCalled();
expect(authClient).toBe(vars.mockAuthClient);
});
});