File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -325,7 +325,7 @@ when the class under test allows a test to provide a [CoroutineDispatcher] but d
325
325
[ CoroutineScope] .
326
326
327
327
Since [ TestCoroutineDispatcher] is stateful in order to keep track of executing coroutines, it is
328
- important to ensure that [ cleanupTestCoroutines] [ TestCoroutineDispatcher .cleanupTestCoroutines] is called after every test case.
328
+ important to ensure that [ cleanupTestCoroutines] [ DelayController .cleanupTestCoroutines] is called after every test case.
329
329
330
330
``` kotlin
331
331
class TestClass {
@@ -340,7 +340,7 @@ class TestClass {
340
340
@After
341
341
fun cleanUp () {
342
342
Dispatchers .resetMain()
343
- testScope .cleanupTestCoroutines()
343
+ testDispatcher .cleanupTestCoroutines()
344
344
}
345
345
346
346
@Test
@@ -449,5 +449,5 @@ If you have any suggestions for improvements to this experimental API please sha
449
449
[ TestCoroutineScope ] : https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-test/kotlinx.coroutines.test/-test-coroutine-scope/index.html
450
450
[ TestCoroutineExceptionHandler ] : https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-test/kotlinx.coroutines.test/-test-coroutine-exception-handler/index.html
451
451
[ TestCoroutineScope.cleanupTestCoroutines ] : https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-test/kotlinx.coroutines.test/-test-coroutine-scope/cleanup-test-coroutines.html
452
- [ TestCoroutineDispatcher .cleanupTestCoroutines] : https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-test/kotlinx.coroutines.test/-test-coroutine-dispatcher /cleanup-test-coroutines.html
452
+ [ DelayController .cleanupTestCoroutines] : https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-test/kotlinx.coroutines.test/-delay-controller /cleanup-test-coroutines.html
453
453
<!-- - END -->
You can’t perform that action at this time.
0 commit comments