Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ materialIconsExtendedAndroid = "1.7.8"

# Google Maps Platform
mapsecrets = "2.0.1"
mapsutils = "6.0.0"
mapsutils = "6.1.0"

# Testing
androidCore = "1.7.0"
Expand Down
9 changes: 9 additions & 0 deletions maps-compose-utils/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,13 @@ android {
enableAndroidTestCoverage = true
}
}

testOptions {
// Required to instantiate DefaultClusterRenderer in unit tests: its inner ViewModifier
// subclasses android.os.Handler(Looper.getMainLooper()), and JVM bytecode rules prevent
// MockK from skipping the superclass Handler.<init> call in android.jar.
unitTests.isReturnDefaultValues = true

@kikoso kikoso Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we need this for the whole module, since it makes any unmocked Android call return a default value and can hide errors in other tests. I would rather mock what ClusterRendererTest needs.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this still needed? With the mockkStatic/mockkConstructor setup in ClusterRendererTest I would expect we can drop it and keep the rest of the module tests strict.

}
}

kotlin {
Expand Down Expand Up @@ -84,5 +91,7 @@ dependencies {
implementation(libs.kotlinx.coroutines.android)
api(libs.maps.utils)

testImplementation(libs.kotlinx.coroutines.test)
testImplementation(libs.mockk)
testImplementation(libs.test.junit)
}
Loading
Loading