Konsist: add test to ensure that functions with @PreviewsDayNight are internal, and fix existing issues.
This commit is contained in:
parent
8ca42d4cfc
commit
6a3c42f189
1 changed files with 11 additions and 0 deletions
|
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue