Hello! Is it possible to write tests in the same f...
# getting-started
d
Hello! Is it possible to write tests in the same file as a function? I want to organize my solutions for the tasks I solve on Codewars Something like this:
I don't mind using something else other than JUnit
s
If it's just for archiving your solutions, you can write the function in the test sourset in the same file as the test.
✔️ 1
c
In a real project, that is not a good idea. For small scripts/prototypes, you can just name your test main and execute it normally
✔️ 1
e
it would be interesting to have something doctest-like for Kotlin, but it doesn't exist now
👍 1