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

This commit is contained in:
Benoit Marty
2023-10-23 12:00:01 +02:00
committed by Benoit Marty
parent 577527902f
commit e49c0c46eb

View File

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