Join Slack
Powered by
Does kotlintest have documentation on interceptors...
# test
r
Robert Menke
08/13/2019, 8:34 PM
Does kotlintest have documentation on interceptors? Can’t seem to find it. I basically want to run my tests in a database transaction and then roll back when finished.
l
LeoColman
08/13/2019, 8:49 PM
Perhaps what you're looking for is Listeners
LeoColman
08/13/2019, 8:49 PM
https://github.com/kotlintest/kotlintest/blob/master/doc/reference.md#listeners
LeoColman
08/13/2019, 8:50 PM
You can register a listener that will act as a
Before
+
After
on each test
LeoColman
08/13/2019, 8:50 PM
But if you need to control the exact execution of a test, perhaps
Extensions
are more correct
r
Robert Menke
08/13/2019, 8:50 PM
That is perfect
@LeoColman
thank you!
4
Views
Open in Slack
Previous
Next