UNPKG

review-copilot

Version:

ReviewCopilot - AI-powered code review assistant with customizable prompts

53 lines (52 loc) 1.58 kB
import { PullRequestReviewInfo } from '../../../utils/git-service.interface'; export interface MockSpinner { start: jest.Mock; stop: jest.Mock; succeed: jest.Mock; fail: jest.Mock; info: jest.Mock; text: string; _cleanup: jest.Mock; } export interface MockOra extends jest.Mock { mockSpinnerInstance: MockSpinner; } export interface MockFile { filename: string; changes: string; } export interface MockCommit extends PullRequestReviewInfo { hash: string; date: string; message: string; author: string; files: MockFile[]; } export interface MockConfig { providers: Record<string, any>; rules: Record<string, any>; triggers?: Record<string, any>; customReviewPoints?: Record<string, any>; } export declare const mockCommit: MockCommit; export declare const mockConfig: MockConfig; export declare const cleanupMocks: () => void; export declare const setupMocks: (customConfig?: MockConfig, customCommits?: MockCommit[]) => { mockConfigManager: { loadConfig: jest.Mock<any, any, any>; getConfig: jest.Mock<any, any, any>; }; mockProvider: { review: jest.Mock<any, any, any>; }; mockVcsProvider: { getPullRequestFiles: jest.Mock<any, any, any>; getPullRequestCommits: jest.Mock<any, any, any>; getCurrentBranchName: jest.Mock<any, any, any>; }; mockGitService: { getPRDetails: jest.Mock<any, any, any>; createIssueComment: jest.Mock<any, any, any>; createReviewComment: jest.Mock<any, any, any>; }; };