mirror of
https://github.com/samsonjs/Peekaboo.git
synced 2026-03-25 09:25:47 +00:00
- Add npm run inspector script for MCP inspector tool - Synchronize Swift CLI version with package.json (1.0.0-beta.9) - Update macOS version requirement to v14 (Sonoma) for n-1 support - Add Swift compiler warnings check in prepare-release script - Convert tests/setup.ts from Jest to Vitest syntax - Update server status tests to match new format 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
36 lines
No EOL
795 B
TypeScript
36 lines
No EOL
795 B
TypeScript
// Vitest setup file
|
|
// Configure global test environment
|
|
|
|
import { beforeEach, afterEach, vi } from 'vitest';
|
|
|
|
// Mock console methods to reduce noise during testing
|
|
const originalConsole = globalThis.console;
|
|
|
|
beforeEach(() => {
|
|
// Reset console mocks before each test
|
|
globalThis.console = {
|
|
...originalConsole,
|
|
log: vi.fn(),
|
|
error: vi.fn(),
|
|
warn: vi.fn(),
|
|
info: vi.fn(),
|
|
debug: vi.fn(),
|
|
};
|
|
});
|
|
|
|
afterEach(() => {
|
|
// Restore original console after each test
|
|
globalThis.console = originalConsole;
|
|
vi.clearAllMocks();
|
|
});
|
|
|
|
// Mock environment variables for testing
|
|
process.env.NODE_ENV = "test";
|
|
process.env.PEEKABOO_AI_PROVIDERS = JSON.stringify([
|
|
{
|
|
type: "ollama",
|
|
baseUrl: "http://localhost:11434",
|
|
model: "llava",
|
|
enabled: true,
|
|
},
|
|
]); |