chore(identity): remove dumb test
This commit is contained in:
parent
042141c781
commit
78e15f6218
1 changed files with 0 additions and 28 deletions
|
|
@ -1,28 +0,0 @@
|
||||||
import { describe, expect, it } from "vitest";
|
|
||||||
|
|
||||||
import type { User } from "./context";
|
|
||||||
import { getChangedUserFields, selectUserFields } from "./selection";
|
|
||||||
|
|
||||||
const user = {
|
|
||||||
Avatar: undefined,
|
|
||||||
Display: "Alice",
|
|
||||||
IotaId: 1,
|
|
||||||
OmikronConnections: [],
|
|
||||||
OnlineStatus: "user_online",
|
|
||||||
PublicKey: "AA==",
|
|
||||||
SubEnd: 0,
|
|
||||||
SubLevel: 0,
|
|
||||||
UserId: 1,
|
|
||||||
Username: "alice",
|
|
||||||
} satisfies User;
|
|
||||||
|
|
||||||
describe("presence selection", () => {
|
|
||||||
it("notifies OnlineStatus selections when presence changes", () => {
|
|
||||||
const next = { ...user, OnlineStatus: "user_dnd" as const };
|
|
||||||
|
|
||||||
expect(getChangedUserFields(user, next)).toEqual(["OnlineStatus"]);
|
|
||||||
expect(selectUserFields(next, ["OnlineStatus"])).toEqual({
|
|
||||||
OnlineStatus: "user_dnd",
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
Loading…
Reference in a new issue