-
Notifications
You must be signed in to change notification settings - Fork 349
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add test ensure all composables are in compose package
- Loading branch information
Showing
1 changed file
with
19 additions
and
0 deletions.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
android/test/arch/src/test/kotlin/net/mullvad/mullvadvpn/test/arch/compose/ComposeTests.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package net.mullvad.mullvadvpn.test.arch.compose | ||
|
||
import androidx.compose.runtime.Composable | ||
import com.lemonappdev.konsist.api.Konsist | ||
import com.lemonappdev.konsist.api.ext.list.withAllAnnotationsOf | ||
import com.lemonappdev.konsist.api.verify.assert | ||
import org.junit.Test | ||
|
||
class ComposeTests { | ||
@Test | ||
fun `all app composables are in the compose packages`() { | ||
allAppComposeFunctions().assert { | ||
it.fullyQualifiedName.startsWith("net.mullvad.mullvadvpn.compose") | ||
} | ||
} | ||
|
||
private fun allAppComposeFunctions() = | ||
Konsist.scopeFromProduction("app").functions().withAllAnnotationsOf(Composable::class) | ||
} |