describe("GatewayClient", () => { beforeEach(() => { fetch.mockClear(); }); describe("getTemplates", () => { it("should call /templates endpoint", () => { const client = new GatewayClient("https://gateway.opla.ai"); client.getTemplates(); expect(fetch).toHaveBeenCalledWith("https://gateway.opla.ai/templates"); }); }); describe("getLanguages", () => { it("should call /languages endpoint", () => { const client = new GatewayClient("https://gateway.opla.ai"); client.getLanguages(); expect(fetch).toHaveBeenCalledWith("https://gateway.opla.ai/languages"); }); }); });