Generate tested code with LLM Assistance
sample of the sequence

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!

Article content


Monikaben Lala

Founder | Product MVP Expert | Fiction Writer | Find me @Dubai Trade Show

1y

Ken, thanks for sharing!

Like
Reply

Thank you for sharing this.

Like
Reply

To view or add a comment, sign in

Others also viewed

Explore topics