test: enhance tests to be specific

This commit is contained in:
ramvignesh-b
2026-04-18 18:49:54 +05:30
parent 428db97ba2
commit 2db7e1f9f5
5 changed files with 168 additions and 23 deletions
+2 -13
View File
@@ -1,13 +1,5 @@
import { HttpResponse, http } from "msw";
import {
afterAll,
beforeAll,
beforeEach,
describe,
expect,
it,
vi,
} from "vitest";
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
import { mockUser } from "../../test/fixtures/user.fixture";
import { server } from "../../test/mocks/server";
import { useAuthStore } from "../store/useAuthStore";
@@ -21,13 +13,10 @@ beforeEach(() => {
user: null,
isInitializing: false,
});
});
beforeAll(() => {
vi.stubEnv("VITE_API_URL", VITE_API_URL);
});
afterAll(() => {
afterEach(() => {
vi.unstubAllEnvs();
});