import { describe, it, expect } from "vitest"; import { DataProviderKey } from "../../utils/dataProviderKey"; import { publish } from "./publish"; type FormData = { email: string; }; const formKey = new DataProviderKey("formData"); describe("publish", () => { it("decorates property and allows get/set", () => { class TestClass { @publish(formKey.email) email = ""; } const instance = new TestClass(); instance.email = "test@example.com"; expect(instance.email).toBe("test@example.com"); }); });