Browse Source

Konsist: add test to ensure that functions with `@PreviewsDayNight` are internal, and fix existing issues.

pull/1624/head
Benoit Marty 11 months ago committed by Benoit Marty
parent
commit
6a3c42f189
  1. 11
      tests/konsist/src/test/kotlin/io/element/android/tests/konsist/KonsistPreviewTest.kt

11
tests/konsist/src/test/kotlin/io/element/android/tests/konsist/KonsistPreviewTest.kt

@ -46,4 +46,15 @@ class KonsistPreviewTest {
it.text.contains("ElementPreview") it.text.contains("ElementPreview")
} }
} }
@Test
fun `Functions with '@PreviewsDayNight' are internal`() {
Konsist
.scopeFromProject()
.functions()
.withAllAnnotationsOf(PreviewsDayNight::class)
.assertTrue {
it.hasInternalModifier
}
}
} }

Loading…
Cancel
Save