Skip to main content
Glama
simple-backend-proxy.test.tsβ€’868 B
import { describe, expect, it, vi } from "vitest"; // Mock the SnapBackAPIClient const mockAnalyzeFast = vi.fn(); // Create a mock API client instance const mockApiClient = { analyzeFast: mockAnalyzeFast, }; // Mock implementation of SnapBackAPIClient vi.mock("../../src/client/snapback-api.js", () => { return { SnapBackAPIClient: vi.fn().mockImplementation(() => mockApiClient), }; }); describe("Backend Proxy", () => { it("should create SnapBackAPIClient with correct configuration", async () => { // This test is just to verify that our mock is working correctly const { SnapBackAPIClient } = await import("../../src/client/snapback-api.js"); const client = new SnapBackAPIClient({ baseUrl: "https://api.snapback.dev", apiKey: "test-key", }); expect(client).toBeDefined(); expect(typeof client.analyzeFast).toBe("function"); }); });

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/snapback-dev/mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server