Skip to main content
Glama

Lighthouse MCP

audit.test.ts874 B
/* eslint-disable @typescript-eslint/no-explicit-any */ import { describe, it, expect, vi } from "vitest"; import { registerAuditTools } from "./audit"; // Mock the MCP server const mockServer = { tool: vi.fn(), }; describe("tools/audit", () => { it("should register audit tools without errors", () => { expect(() => { registerAuditTools(mockServer as any); }).not.toThrow(); // Verify that tools were registered expect(mockServer.tool).toHaveBeenCalledTimes(4); // run_audit, get_accessibility_score, get_seo_analysis, check_pwa_readiness // Verify tool names const toolCalls = mockServer.tool.mock.calls; expect(toolCalls[0][0]).toBe("run_audit"); expect(toolCalls[1][0]).toBe("get_accessibility_score"); expect(toolCalls[2][0]).toBe("get_seo_analysis"); expect(toolCalls[3][0]).toBe("check_pwa_readiness"); }); });

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/danielsogl/lighthouse-mcp-server'

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