Summary of What Needs to be Done:
Add unit tests for the four exported prompt-building functions in src/lib/cv/cv-prompts.ts: cvBulletPointPrompt, cvProjectDescriptionPrompt, cvProfessionalSummaryPrompt, and cvSkillSummaryPrompt. These are pure functions that build AI prompt strings from ContributionClassification and TargetRole inputs.
Changes that Need to be Made:
- Create test/cv-prompts.test.ts
- Write tests for cvBulletPointPrompt: verify output is non-empty string, contains role, contains honesty clause, contains repository data when repos are present, falls back gracefully when repos array is empty
- Write tests for cvProjectDescriptionPrompt: verify output contains role, repos, JSON format instruction
- Write tests for cvProfessionalSummaryPrompt: verify output contains role, primary domain, and contribution metrics
- Write tests for cvSkillSummaryPrompt: verify output contains role, tech stack data, and JSON format instruction
- All tests should use realistic mock data derived from @/types/cv-types
Impact that it would Provide:
These tests validate that the prompt generation logic correctly serialises contribution data and enforces the honesty constraints for the AI CV generator. This prevents malformed prompts from being sent to the Groq API, reducing hallucination risk.
Hello @Priyanshu-byte-coder, please assign this issue to me (@tmdeveloper007) so I can open a focused PR.
Summary of What Needs to be Done:
Add unit tests for the four exported prompt-building functions in src/lib/cv/cv-prompts.ts: cvBulletPointPrompt, cvProjectDescriptionPrompt, cvProfessionalSummaryPrompt, and cvSkillSummaryPrompt. These are pure functions that build AI prompt strings from ContributionClassification and TargetRole inputs.
Changes that Need to be Made:
Impact that it would Provide:
These tests validate that the prompt generation logic correctly serialises contribution data and enforces the honesty constraints for the AI CV generator. This prevents malformed prompts from being sent to the Groq API, reducing hallucination risk.
Hello @Priyanshu-byte-coder, please assign this issue to me (@tmdeveloper007) so I can open a focused PR.