-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Add tests for the Composable String.toShortUrl #28094
Comments
Hey, I am new to Open Source and have slight experience in Android Development using compose, is this issue suitable for my skill level? |
@poseidon2060 Thanks for the help. Feel free to give this a shot. |
Can you direct me to where to approach this problem from? |
Hey, @gabrielluong I wrote the following test for
But when I run it starts to give the following error:
Can you please help me understand what I did wrong? |
Moved to bugzilla: https://bugzilla.mozilla.org/show_bug.cgi?id=1813290 Change performed by the Move to Bugzilla add-on. |
Ah gotcha, I was leaning towards the test for the composable
String.toShortUrl()
being optional since it is a helper function either calling the upstreamtoShortUrl
implementation or otherwise calling the built inString.take
. However, I am thinking now it might be a good exercise to learn how we can test composable functions. So, I will file a followup.Originally posted by @gabrielluong in #28071 (comment)
The request here is to add tests the Composable
String.toShortUrl()
function https://searchfox.org/mozilla-mobile/source/fenix/app/src/main/java/org/mozilla/fenix/ext/String.kt#83. The tests are located in https://searchfox.org/mozilla-mobile/source/fenix/app/src/test/java/org/mozilla/fenix/ext/StringTest.kt. This might be a good learning experience to learn how to write tests for composable functions and can serve as a future example for the team.┆Issue is synchronized with this Jira Task
The text was updated successfully, but these errors were encountered: