In Kotest 5.9.1, the artifact `kotest-runner-junit...
# kotest
o
In Kotest 5.9.1, the artifact
kotest-runner-junit5
contained a dependency to
kotlinx-coroutines
, which was great as sometimes I needed Coroutines in my tests, e.g. with Arrow's Raise DSL, you need Coroutines. Now this transient dependency disappeared... the
runTest
function is not available anymore. This is really bad, as now my project which does not really do much else with Coroutines needs to depend on
kotlinx-coroutines
itself... I need to track down the latest version, etc. Can this be re-added? Any reason for removal?
๐Ÿ‘ 1
s
Add kotest-assertions-table for the row and tables stuff
o
@sam the problem is that exactly those things are not on the Features and Changes page. I wouldn't ask if they were... ๐Ÿ˜ž
it's probably not very clear
(also working on the withData stuff btw, am close, will be in 6.0.5)
๐Ÿ‘ 1
o
E.g. I had a dependency to
io.kotest:kotest-framework-datatest
which seems to be completely gone and only
io.kotest:kotest-framework-data
is mentioned. And no, I am using Kotest 5.0x style
withData
that's why I did not consider what is on the Table Driven Testing section!
s
ohhhh ok, the row/header stuff is the -table thing
o
Yeah, but I like to use it a lot with
withData
to put things together. Otherwise I would have
Triple
there and nothing for 4+ elements...
What about my problem with the missing coroutines dependency? Is that on purpose?
With Kotest 5.0.x I did not have to care about any dependency and was able to use
runTest
. Now I need to add another dependency.
s
the coroutines should be hidden really, coroutines are such a fundamental part of kotlin I don't think its for kotest to set the version on that
anymore than you'd expect kotest to set the stdlib version
back to the row thing, you like all the TupleX stuff?
that's a good reason to bring in -table yeah
o
Correct, I use data driven tests, but the convenience function
row
for the data elements, because I never need to care about the amount of components and never need to switch from
a to b
for two,
Triple(a, b, c)
for three elements and then get stuck with when I need 4 or more,,, I simply use
row(....)
for everything... Maybe that was not the intended use.... ๐Ÿ˜‰
One other slight disturbance is the moving of the
fail(...)
function... it used to be here
io.kotest.assertions.fail
but this import does not work anymore, now by fixing the import in IntelliJ it seems to be this one:
io.kotest.assertions.AssertionErrorBuilder.Companion.fail
which is quite clumsy and wordy.... is this intentional?
s
it was changed as as part of the updates to the assertion builders to fix the click to show diff stuff in intellij
I'll restore the original
fail
, as an alias to the new one
๐Ÿ‘ 1
o
With each project, I am stumbling across more things that disappeared. Sorry, @sam...
forEachAsClue
is gone and searching the docs reveals very few hints for this convenience function... can I replicate this by
forEach { withClue(it) { ... } }
?
s
Yes that works or we can see why it went away and add it back
๐Ÿ‘ 1
o
If I was the only one using it, it's fine.... ๐Ÿ˜‰
s
Well in general we shouldn't be removing public apis:)