Day 7 of 21 Days of Javascript
Using LLMs to generate test cases.
For a long while I was stuck on a bonus exercise from Chapter 4 of my guide book. I ended up with a very verbose solution and the only way I could fully test it was to ask ChaptGPT to create several test cases for me. These revealed edge cases that I hadn't considered, and through this process I patched the code to get to a correct solution.
This is a very useful way of using LLMs to learn. You can use them to generate test cases for your code. Test cases are easy to read and follow, and so even if an LLM creates a test case that is wrong, its easy to verify it.