feat(admin): add user account management
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { describe, expect, it, vi } from "vitest";
|
||||
import { formatDiscordNickname, lookupJavaProfile } from "../src/index";
|
||||
import { formatDiscordNickname, formatManagedDiscordNickname, lookupJavaProfile } from "../src/index";
|
||||
|
||||
describe("Java Edition profiles", () => {
|
||||
it("returns Mojang's canonical UUID and username", async () => {
|
||||
@@ -27,4 +27,9 @@ describe("Java Edition profiles", () => {
|
||||
);
|
||||
expect(formatDiscordNickname("Sam", "Notch")).toBe("Sam (Notch)");
|
||||
});
|
||||
|
||||
it("falls back to the user's name when an admin removes their final account", () => {
|
||||
expect(formatManagedDiscordNickname("Alexandria Catherine", null)).toBe("Alexandria Catherine");
|
||||
expect(formatManagedDiscordNickname("A name that is definitely longer than Discord allows", null)).toHaveLength(32);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user