test(cli-tools): add tests for formatters, prompts, and updateEnvFile#71
test(cli-tools): add tests for formatters, prompts, and updateEnvFile#71ak68a wants to merge 2 commits intoagentcommercekit:mainfrom
Conversation
Cover all utility functions that previously had zero tests: formatters: sectionHeader divider width and step numbering, successMessage/errorMessage prefixes, wordWrap at custom and default widths, demoHeader/demoFooter non-empty output, link URL preservation. update-env-file: create new file, update existing keys in-place, append new keys, preserve comments and blank lines, multiple keys, values containing equals signs. Uses real temp directories. prompts: log with default wrapping, log with wrap disabled, logJson formatted output.
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
tools/cli-tools/which previously had zero test coverageWhat's tested
formatters — sectionHeader divider width and step numbering, successMessage/errorMessage prefixes, wordWrap at custom and default widths, link URL preservation
update-env-file — create new .env, update existing keys in-place, append new keys, preserve comments/blank lines, multiple keys at once, values containing equals signs. Uses real temp directories, not mocks.
prompts — log with default wrapping, log with wrap disabled, logJson formatted output
Test plan
pnpm --filter ./tools/cli-tools test— 20 tests passpnpm run check— clean