Code review - more tests

This commit is contained in:
Valere
2024-05-07 09:38:26 +02:00
parent c430699711
commit 94bbcbf503
5 changed files with 120 additions and 4 deletions

View File

@@ -33,6 +33,7 @@ class FakeAnalyticsService(
val capturedEvents = mutableListOf<VectorAnalyticsEvent>()
val screenEvents = mutableListOf<VectorAnalyticsScreen>()
val trackedErrors = mutableListOf<Throwable>()
val capturedUserProperties = mutableListOf<UserProperties>()
override fun getAvailableAnalyticsProviders(): Set<AnalyticsProvider> = emptySet()
@@ -65,6 +66,7 @@ class FakeAnalyticsService(
}
override fun updateUserProperties(userProperties: UserProperties) {
capturedUserProperties += userProperties
}
override fun trackError(throwable: Throwable) {

View File

@@ -87,7 +87,7 @@ class PosthogAnalyticsProvider @Inject constructor(
userProperties.getProperties()?.let {
pendingUserProperties?.putAll(it)
}
// We are not currently using `identify` in EIX, if it was the case
// We are not currently using `identify` in EAX, if it was the case
// we could have called identify to update the user properties.
// For now, we have to store them, and they will be updated when the next call
// to capture will happen.