[Upd] User states

This commit is contained in:
Alex 2026-08-07 23:05:26 +02:00
commit ec019a4dff
Signed by: alex
SSH key fingerprint: SHA256:D1+Ub8o0v4K5y1JNivW8IxEOelqLSvPmUzBbDIoZkRQ
16 changed files with 667 additions and 87 deletions

View file

@ -0,0 +1,18 @@
import { describe, expect, it } from "vitest";
import { mtp } from "@tensamin/shared/data";
import { onlineStatusOptions } from "./status-options";
describe("sidebar status requests", () => {
it.each(onlineStatusOptions)("sends $label as $value", ({ value }) => {
expect(mtp.SetUserState.request.parse({ UserState: value })).toEqual({
UserState: value,
});
});
it("keeps status text on the profile operation", () => {
expect(mtp.ChangeUserData.request.parse({ Status: "At lunch" })).toEqual({
Status: "At lunch",
});
});
});