test(auth): add token store reset after each test

This commit is contained in:
Ilia Mashkov
2026-04-02 12:47:48 +03:00
parent f98ccf468c
commit 6516172a6b

View File

@@ -6,6 +6,7 @@ import {
MOCK_NEW_EMAIL,
MOCK_PASSWORD,
} from "../../../api/calls/mocks";
import { useTokenStore } from "shared/api";
const server = setupServer(
apiCalls.loginMock,
@@ -21,6 +22,7 @@ describe("authStore", () => {
beforeAll(() => server.listen({ onUnhandledRequest: "error" }));
afterEach(() => {
useAuthStore.getState().reset();
useTokenStore.getState().reset();
server.resetHandlers();
});
afterAll(() => server.close());