Skip to content

Commit

Permalink
Provide coroutineContext in tests explicitly
Browse files Browse the repository at this point in the history
  • Loading branch information
MatkovIvan committed Jul 9, 2024
1 parent 56b10af commit fc57d27
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,14 @@ import kotlin.test.assertEquals
import kotlinx.coroutines.test.StandardTestDispatcher
import kotlinx.coroutines.test.runTest

class MultiLayerComposeSceneTest {
class CanvasLayersComposeSceneTest {

@Test
fun sceneSizeChangeTriggersInvalidation() = runTest(StandardTestDispatcher()) {
var invalidationCount = 0
val scene = CanvasLayersComposeScene(
size = IntSize(100, 100),
coroutineContext = coroutineContext,
invalidate = { invalidationCount++ }
)
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -755,6 +755,7 @@ class PopupTest {
val windowInfo = it.platformContext.windowInfo as WindowInfoImpl
windowInfo.containerSize = IntSize(50, 50)
},
coroutineContext = coroutineContext,
invalidate = ::invalidate
)
try {
Expand Down

0 comments on commit fc57d27

Please sign in to comment.