So we got these slash commands slash doc for example could be used to generate comments
documentation for the selected code but slash tests is another interesting command which
I want to explore here now because as you can also see here you can use this command
to generate unit tests for the selected code and it turns out that AI is really good when
it comes to generating unit tests now if I run slash tests here I could again add more
information if I were looking for specific kinds of tests or if I only wanted to test
something very specific but you can also just run it like this and let the AI figure out
which tests to write and what's really convenient here is that it will then go ahead and show
you which tests it wants to generate here and you see these are the unit tests it would
suggest for this specific function and we could now accept this and it did actually
add them in a new file a new file which I now have to save in a project like db backup
test for example so it's also smart enough to understand that I probably don't want
to add the unit tests in the same file as my main application code but that I instead
want to have them in a separate file like this and that's there for another pretty
useful feature because writing tests is important but can be annoying some developers absolutely
don't want to do it and it turns out that AI is pretty good at that task because of
course it got the application code as very useful context and therefore in many cases
it's able to figure out and write decent tests so that you have all the tests without
going through the effort of writing them manually