-
Notifications
You must be signed in to change notification settings - Fork 6
Crashes in Snapshot tests on Android #8
Copy link
Copy link
Closed
Description
I've been running snapshot tests on Android and whenever I include TextRuleDefaults.phoneNumber() it crashes with an NPE since system services aren't available in snapshot tests.
Specifically it crashes here since the service is null. The workaround is to not include phone numbers. Try/catch isn't supported for compose functions so I can't do that.
AutoLinkText/autolinktext/src/androidMain/kotlin/sh/calvin/autolinktext/TextMatcher.android.kt
Line 50 in 3ef0375
| (contextData as AndroidContextData).context.getSystemService(TelephonyManager::class.java).simCountryIso.let { |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels