Hi All, Can anyone help me, <W.r.to> Unit-Tests ...
# multiplatform
m
Hi All, Can anyone help me, W.r.to Unit-Tests in KMM How to get Android context in Kotlin Multiplatform Android test?
t
Generally you shouldn't use context in unit tests. If you have to, you can mock it with a mocking library. But mock context sparingly, these are integration tests not unit tests
If you're talking about the androidTest folder, and I'm just misunderstanding you, then you can use the instrumentation registry to get the real context on the running device.