diff --git a/orchestrator/src/server/services/ai-resilience.test.ts b/orchestrator/src/server/services/ai-resilience.test.ts index 1f0decb..acce505 100644 --- a/orchestrator/src/server/services/ai-resilience.test.ts +++ b/orchestrator/src/server/services/ai-resilience.test.ts @@ -8,16 +8,65 @@ import type { Job } from '../../shared/types.js'; // We need to mock 'fetch' globally for these tests const globalFetch = global.fetch; +const now = new Date().toISOString(); + // A simple mock job const mockJob: Job = { id: 'test-job', - employer: 'Test Corp', + source: 'gradcracker', + sourceJobId: null, + jobUrlDirect: null, + datePosted: null, title: 'Senior Engineer', + employer: 'Test Corp', + employerUrl: null, + jobUrl: 'http://test.com', + applicationLink: null, + disciplines: null, + deadline: null, + salary: null, + location: null, + degreeRequired: null, + starting: null, jobDescription: 'Looking for a TypeScript and React expert.', - url: 'http://test.com', - date: '2023-01-01', - source: 'test' as any, - status: 'discovered' + status: 'discovered', + suitabilityScore: null, + suitabilityReason: null, + tailoredSummary: null, + tailoredHeadline: null, + tailoredSkills: null, + selectedProjectIds: null, + pdfPath: null, + notionPageId: null, + jobType: null, + salarySource: null, + salaryInterval: null, + salaryMinAmount: null, + salaryMaxAmount: null, + salaryCurrency: null, + isRemote: null, + jobLevel: null, + jobFunction: null, + listingType: null, + emails: null, + companyIndustry: null, + companyLogo: null, + companyUrlDirect: null, + companyAddresses: null, + companyNumEmployees: null, + companyRevenue: null, + companyDescription: null, + skills: null, + experienceRange: null, + companyRating: null, + companyReviewsCount: null, + vacancyCount: null, + workFromHomeType: null, + discoveredAt: now, + processedAt: null, + appliedAt: null, + createdAt: now, + updatedAt: now, }; const mockProfile = { name: 'Test User' }; diff --git a/orchestrator/src/shared/types.ts b/orchestrator/src/shared/types.ts index b5dc00f..7502ddc 100644 --- a/orchestrator/src/shared/types.ts +++ b/orchestrator/src/shared/types.ts @@ -172,6 +172,10 @@ export interface PipelineConfig { sources: JobSource[]; // Job sources to crawl profilePath: string; // Path to profile JSON outputDir: string; // Directory for generated PDFs + enableCrawling?: boolean; + enableScoring?: boolean; + enableImporting?: boolean; + enableAutoTailoring?: boolean; } export interface PipelineRun {