I have following interface with an extension function in an Android project
interface MyInterface {
fun aMethod(): String
}
private inline fun MyInterface.myExtensionFunction(
aString: String?,
) = with(aString) {
//Some actions
}
Although the extension function has tests, when generating the Jacoco test report I see 0% coverage in this file. When running the tests with coverage using Android studio I see the right coverage.
An important thing to mention, non-inline extension functions appear to be covered in both the Jacoco and Android Studio report.
How should I set up Jacoco to include myExtensionFunction
tests in the coverage report?