UNPKG

@web-interact-mcp/client

Version:

A production-ready TypeScript library that transforms web applications into MCP (Model Context Protocol) servers with robust two-way communication via SignalR

64 lines 1.69 kB
"use strict"; /** * Test setup file for Web Interact MCP library */ Object.defineProperty(exports, "__esModule", { value: true }); // Mock Shepherd.js if not available globalThis.Shepherd = globalThis.Shepherd || { Tour: class MockTour { constructor() { // Mock implementation } addStep() { return this; } start() { return this; } cancel() { return this; } complete() { return this; } on() { return this; } } }; // Mock DOM APIs if needed if (typeof window !== 'undefined') { Object.defineProperty(window, 'matchMedia', { writable: true, value: (query) => ({ matches: false, media: query, onchange: null, addListener: () => { }, // deprecated removeListener: () => { }, // deprecated addEventListener: () => { }, removeEventListener: () => { }, dispatchEvent: () => { }, }), }); } // Mock fetch if needed globalThis.fetch = globalThis.fetch || (() => Promise.resolve({ ok: true, json: () => Promise.resolve({}), text: () => Promise.resolve(''), statusText: 'OK', status: 200 })); // Mock console methods to reduce noise in tests const originalConsole = console; if (typeof globalThis.jest !== 'undefined') { const jestMock = globalThis.jest; global.console = { ...originalConsole, log: jestMock.fn(), warn: jestMock.fn(), error: originalConsole.error, // Keep error for debugging }; } //# sourceMappingURL=test-setup.js.map