Generate tested code with LLM Assistance
Here's the flow of prompts I used today to convert a code file from one language to another and provide test coverage.
The specific use case:
Converting a code file, part of a larger codebase, in a language I am unfamiliar with (Elixir) and that has no tests into a code file and unit tests in a language I am familiar with (Node).
Outcome: 50 lines of node.js codes covered by 10 tests (90+% coverage) with documented expectations. 30 min.
Caveat: Whether the file performs all the needed behavior will become more apparent as I convert other dependencies across, i.e., I still have to make sure it works!
Founder | Product MVP Expert | Fiction Writer | Find me @Dubai Trade Show
1yKen, thanks for sharing!
Thank you.
1yThank you for sharing this.