Skip to content

Commit 0e4b50a

Browse files
committed
Fix the broken test
1 parent bfbdca9 commit 0e4b50a

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

kotlinx-coroutines-core/js/test/ImmediateDispatcherTest.kt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,12 @@ import kotlin.test.*
99

1010
class ImmediateDispatcherTest : MainDispatcherTestBase() {
1111

12-
/** Tests that entering [MainCoroutineDispatcher.immediate] takes priority even outside [Dispatchers.Main]. */
12+
/** Tests that [MainCoroutineDispatcher.immediate] doesn't require dispatches from the test context. */
1313
@Test
14-
@Ignore // TODO: started failing for some reason
1514
fun testImmediate() = runTest {
1615
expect(1)
1716
val job = launch { expect(3) }
18-
assertTrue(Dispatchers.Main.immediate.isDispatchNeeded(currentCoroutineContext()))
17+
assertFalse(Dispatchers.Main.immediate.isDispatchNeeded(currentCoroutineContext()))
1918
withContext(Dispatchers.Main.immediate) {
2019
expect(2)
2120
}

0 commit comments

Comments
 (0)