How do you name unit tests written with the `kotli...
# multiplatform
e
How do you name unit tests written with the
kotlin.test
API? I used to write test function names like
Copy code
fun `Given A, When B, Then C`() {}
But in my multiplatform project the comma
,
isn't allowed in test function names. Do you know about any practical naming conventions?
k
backticks spaces also aren’t allowed in js source sets, so normally I do snake case in tests. I don’t like camel case for tests. This is likely an unpopular opinion.
gratitude thank you 2
j
hope they fix the problem on JS tho, it is annoying mixing styles based on the project.
I do the same than the OP, but just without any capital letter except concrete names, replacing spaces if JS is involved
gratitude thank you 1
j
Backticks are allowed in JS. JS does not allow spaces, however
Underscore works everywhere if you need a stand in for a space.
gratitude thank you 2