import { describe, it, expect } from "vitest"; import { DataProviderKey } from "../../utils/dataProviderKey"; import { subscribe } from "./subscribe"; type ControlStats = { gauge: number; checkedTickets: { id: string }[]; }; const statsKey = new DataProviderKey("stats"); describe("subscribe", () => { it("accepts DataProviderKey and binds to path", () => { class TestClass { @subscribe(statsKey.gauge) gauge = 0; } const instance = new TestClass(); expect(instance.gauge).toBe(0); }); });