UNPKG

observability-analyzer

Version:

Production-ready MCP Server for intelligent Loki/Tempo observability dashboard analysis and generation

47 lines 1.56 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); // Global test setup const globals_1 = require("@jest/globals"); // Mock axios for all tests globals_1.jest.mock('axios', () => ({ create: globals_1.jest.fn(() => ({ get: globals_1.jest.fn(), post: globals_1.jest.fn(), defaults: {} })) })); // Mock filesystem operations globals_1.jest.mock('fs', () => ({ existsSync: globals_1.jest.fn(), readFileSync: globals_1.jest.fn(), writeFileSync: globals_1.jest.fn(), mkdirSync: globals_1.jest.fn() })); // Mock os module globals_1.jest.mock('os', () => ({ homedir: globals_1.jest.fn(() => '/mock/home') })); // Mock path module globals_1.jest.mock('path', () => ({ join: globals_1.jest.fn((...args) => args.join('/')), dirname: globals_1.jest.fn((path) => path.split('/').slice(0, -1).join('/')), resolve: globals_1.jest.fn((...args) => '/' + args.join('/').replace(/\/+/g, '/')) })); // Global test timeout globals_1.jest.setTimeout(10000); // Suppress console logs in tests unless explicitly needed const originalConsoleLog = console.log; const originalConsoleWarn = console.warn; const originalConsoleError = console.error; beforeEach(() => { console.log = globals_1.jest.fn(); console.warn = globals_1.jest.fn(); console.error = globals_1.jest.fn(); }); afterEach(() => { console.log = originalConsoleLog; console.warn = originalConsoleWarn; console.error = originalConsoleError; globals_1.jest.clearAllMocks(); }); //# sourceMappingURL=setup.js.map