fix(housekeeping): count preference payload bytes

This commit is contained in:
Simo committed 2026-08-27 17:53:16 +02:00
1 parent 4e0bf598ed
commit 60968409aa
3 files changed
+28 -2

No files matched your search

+10 -1
View File
@@ -1,4 +1,4 @@
import { beforeEach, describe, expect, it, vi } from "vitest";
import { beforeEach, describe, expect, expectTypeOf, it, vi } from "vitest";
vi.mock("@/features/housekeeping/foundation/server-capability-context", () => ({
getHousekeepingCapabilityContext: vi.fn(),
@@ -40,6 +40,15 @@ describe("housekeeping preference actions", () => {
expect(saveHousekeepingPreferences).toHaveLength(1);
});
it("publishes exact action signatures without caller-controlled dependencies", () => {
expectTypeOf<
Parameters<typeof loadHousekeepingPreferences>
>().toEqualTypeOf<[]>();
expectTypeOf<
Parameters<typeof saveHousekeepingPreferences>
>().toEqualTypeOf<[input: unknown]>();
});
it("derives the read owner from the server capability context", async () => {
const result = await loadHousekeepingPreferences();