You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Replace template leftover tests with real coverage #43
Both test files are Flutter plugin template leftovers that assert behaviour this plugin never implements.
android/src/test/.../SmartTextFlutterPluginTest.kt calls onMethodCall with "getPlatformVersion", a method the plugin does not handle, then verifies a success("Android ...") reply it never sends.
test/src/smart_text_flutter_method_channel_test.dart is named getPlatformVersion, stubs the channel to return the string '42' where the call site requests a List, and expects [].
Neither could be executed during the audit, so treat "these fail" as a strong expectation from reading them rather than a verified result. Either way, neither asserts anything about this plugin, so real coverage is effectively zero.
Proposal: delete both and test the span-stitching logic instead. That logic is pure, it exists in both Kotlin and Swift, and it is where nearly every bug found in the audit lives. Table-driven tests over (input text, detected ranges) would have caught the emoji offset bug, the inverted empty-links branch, and the unsorted-links assumption.
Activity