From 74b61004e7e57092c12fc90b541a9bf7d652d70f Mon Sep 17 00:00:00 2001 From: Mathis HERRIOT <197931332+0x485254@users.noreply.github.com> Date: Wed, 14 Jan 2026 21:59:51 +0100 Subject: [PATCH] refactor(auth): rename `id` to `uuid` in `AuthStatus` and mock `uuid` in tests --- backend/src/auth/auth.service.spec.ts | 4 ++++ frontend/src/types/auth.ts | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/backend/src/auth/auth.service.spec.ts b/backend/src/auth/auth.service.spec.ts index 4164ad7..6564cb8 100644 --- a/backend/src/auth/auth.service.spec.ts +++ b/backend/src/auth/auth.service.spec.ts @@ -1,3 +1,7 @@ +jest.mock("uuid", () => ({ + v4: jest.fn(() => "mocked-uuid"), +})); + import { Test, TestingModule } from "@nestjs/testing"; jest.mock("@noble/post-quantum/ml-kem.js", () => ({ diff --git a/frontend/src/types/auth.ts b/frontend/src/types/auth.ts index 401a652..0056339 100644 --- a/frontend/src/types/auth.ts +++ b/frontend/src/types/auth.ts @@ -13,7 +13,7 @@ export interface RegisterPayload { export interface AuthStatus { isAuthenticated: boolean; user: null | { - id: string; + uuid: string; username: string; displayName?: string; avatarUrl?: string;