mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 21:32:34 +00:00
Add Konsist test to use isNull() instead of isEqualTo(null), and fix existing issue.
This commit is contained in:
@@ -98,4 +98,16 @@ class KonsistTestTest {
|
||||
functionDeclaration.text.contains("isEqualTo(empty")
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `use isNull() instead of isEqualTo(null)`() {
|
||||
Konsist
|
||||
.scopeFromTest()
|
||||
.functions()
|
||||
// Exclude self
|
||||
.withoutName("use isNull() instead of isEqualTo(null)")
|
||||
.assertFalse { functionDeclaration ->
|
||||
functionDeclaration.text.contains("isEqualTo(null)")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user