Description
The buildUserPrompt function in src/llm/prompt.ts has no direct unit tests. It takes a diff string and returns a formatted user prompt containing the diff in a fenced code block with instructions.
Proposed Solution
Add tests that verify:
- The output includes the literal diff text
- The output includes the 'Generate 3 commit message suggestions' instruction
- The output wraps the diff in triple-backtick fencing
- An empty diff is handled correctly
Why It is a Good First Issue
This is a tiny pure function with a clear contract. The test infrastructure and import patterns are well-established (see tests/build-system-prompt.test.mjs which already tests buildSystemPrompt). Adding a few assertion lines is straightforward.
Files
- src/llm/prompt.ts (lines 60-62)
- tests/build-system-prompt.test.mjs (reference for patterns)
Description
The buildUserPrompt function in src/llm/prompt.ts has no direct unit tests. It takes a diff string and returns a formatted user prompt containing the diff in a fenced code block with instructions.
Proposed Solution
Add tests that verify:
Why It is a Good First Issue
This is a tiny pure function with a clear contract. The test infrastructure and import patterns are well-established (see tests/build-system-prompt.test.mjs which already tests buildSystemPrompt). Adding a few assertion lines is straightforward.
Files