feat: implement user profiles with achievements and primary badge system #58

Merged
naomi merged 17 commits from feat/user-profiles into main 2026-02-19 22:21:18 -08:00
Showing only changes of commit 198fe240f7 - Show all commits
+46 -42
View File
@@ -10,30 +10,32 @@ describe("auth Types", () => {
describe("user interface", () => {
it("should accept valid user objects", () => {
const userWithAvatar: User = {
avatar: "https://example.com/avatar.png",
discordId: "discord123",
email: "test@example.com",
id: "user123",
inDiscord: true,
isAdmin: true,
isBanned: false,
isMod: true,
isStaff: true,
isVip: false,
username: "testuser",
avatar: "https://example.com/avatar.png",
discordId: "discord123",
email: "test@example.com",
id: "user123",
inDiscord: true,
isAdmin: true,
isBanned: false,
isMod: true,
isStaff: true,
isVip: false,
profilePublic: true,
username: "testuser",
};
const userWithoutAvatar: User = {
discordId: "discord456",
email: "another@example.com",
id: "user456",
inDiscord: false,
isAdmin: false,
isBanned: false,
isMod: false,
isStaff: false,
isVip: true,
username: "anotheruser",
discordId: "discord456",
email: "another@example.com",
id: "user456",
inDiscord: false,
isAdmin: false,
isBanned: false,
isMod: false,
isStaff: false,
isVip: true,
profilePublic: false,
username: "anotheruser",
};
expect(userWithAvatar.avatar).toBe("https://example.com/avatar.png");
@@ -44,16 +46,17 @@ describe("auth Types", () => {
it("should handle all boolean flags correctly", () => {
const bannedUser: User = {
discordId: "discord789",
email: "banned@example.com",
id: "banned123",
inDiscord: false,
isAdmin: false,
isBanned: true,
isMod: false,
isStaff: false,
isVip: false,
username: "banneduser",
discordId: "discord789",
email: "banned@example.com",
id: "banned123",
inDiscord: false,
isAdmin: false,
isBanned: true,
isMod: false,
isStaff: false,
isVip: false,
profilePublic: false,
username: "banneduser",
};
expect(bannedUser.isBanned).toBeTruthy();
@@ -97,17 +100,18 @@ describe("auth Types", () => {
const authResponse: AuthResponse = {
accessToken: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
user: {
avatar: "https://example.com/avatar.png",
discordId: "discord123",
email: "test@example.com",
id: "user123",
inDiscord: true,
isAdmin: false,
isBanned: false,
isMod: false,
isStaff: false,
isVip: false,
username: "testuser",
avatar: "https://example.com/avatar.png",
discordId: "discord123",
email: "test@example.com",
id: "user123",
inDiscord: true,
isAdmin: false,
isBanned: false,
isMod: false,
isStaff: false,
isVip: false,
profilePublic: true,
username: "testuser",
},
};