diff --git a/android/app/build.gradle.kts b/android/app/build.gradle.kts index 4e72d441..628b03b1 100644 --- a/android/app/build.gradle.kts +++ b/android/app/build.gradle.kts @@ -80,6 +80,19 @@ android { buildConfig = true } + testOptions { + unitTests { + // JVM unit tests run against android.jar's stub methods, + // which throw `RuntimeException("Method ... not mocked")` + // when touched (including statics like Bundle.EMPTY). + // Return defaults instead so tests that pass Bundles + // through without inspecting them (e.g. SessionCommand + // construction in LikeMediaCallbackTest) just work, + // without dragging in Robolectric. + isReturnDefaultValues = true + } + } + packaging { resources.excludes += setOf(