Files
site/apps/web/src/modules/auth/store/authStore.test.ts
T
vlad 86cc3fa541 Update admin theme/layout and refresh README details.
Align the project baseline with the latest admin interface styling and layout structure while documenting setup and usage updates in README.
2026-07-14 17:12:28 +03:00

19 lines
569 B
TypeScript

import { describe, expect, it } from "vitest";
import { useAuthStore } from "./authStore";
describe("authStore", () => {
it("stores and clears session in memory", () => {
useAuthStore.getState().setBootstrapped(true);
useAuthStore.getState().setSession("token", {
id: "1",
email: "u@e.com",
role: "user",
is_superuser: false,
status: "active"
});
expect(useAuthStore.getState().accessToken).toBe("token");
useAuthStore.getState().clearSession();
expect(useAuthStore.getState().accessToken).toBeNull();
});
});