Add Konsist test to use isTrue() instead of isEqualTo(true), and fix existing issues.
This commit is contained in:
parent
65924eac6b
commit
7c58a843dc
9 changed files with 48 additions and 36 deletions
|
|
@ -74,4 +74,16 @@ class KonsistTestTest {
|
|||
functionDeclaration.text.contains("isEqualTo(false)")
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `use isTrue() instead of isEqualTo(true)`() {
|
||||
Konsist
|
||||
.scopeFromTest()
|
||||
.functions()
|
||||
// Exclude self
|
||||
.withoutName("use isTrue() instead of isEqualTo(true)")
|
||||
.assertFalse { functionDeclaration ->
|
||||
functionDeclaration.text.contains("isEqualTo(true)")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue