Files
multica/tests/setup/vitest.setup.ts
Jiayuan b10b3ff709 Add AI code safety defense system: tests, pre-commit hooks, and CI
Implemented three-layer defense mechanism to prevent AI-generated code from breaking the codebase:
- Layer 1: AGENTS.md with universal AI agent instructions
- Layer 2: Husky pre-commit hooks with test file checking
- Layer 3: GitHub Actions CI with TypeScript, ESLint, tests, and coverage

Includes design document, test infrastructure, and coverage thresholds.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-01-16 00:22:33 +08:00

9 lines
164 B
TypeScript

import { vi } from 'vitest'
// Mock electron module globally
vi.mock('electron', () => ({
app: {
getPath: vi.fn().mockReturnValue('/mock/user/data')
}
}))