Fix test warning (#5558)

* Introduce JsonProvider.

It will ensure that classes are using the correct Json instances in the unit tests.

* Avoid creating a Json instance many times.

* Update ref.
This commit is contained in:
Benoit Marty 2025-10-20 12:08:05 +02:00 committed by GitHub
commit b62382ffc7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
23 changed files with 112 additions and 58 deletions

View file

@ -35,7 +35,6 @@ import kotlinx.coroutines.CoroutineName
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.MainScope
import kotlinx.coroutines.plus
import kotlinx.serialization.json.Json
import java.io.File
@BindingContainer
@ -121,10 +120,4 @@ object AppModule {
fun providesEmojibaseProvider(@ApplicationContext context: Context): EmojibaseProvider {
return DefaultEmojibaseProvider(context)
}
@Provides
@SingleIn(AppScope::class)
fun providesJson(): Json = Json {
ignoreUnknownKeys = true
}
}