Fix deprecared API usages in test
This commit is contained in:
+1
-1
@@ -4,7 +4,7 @@ fun checkJsNames(base: String, o: Any) {
|
||||
val regex = Regex("^$base(_[0-9a-zA-Z]+\\\$)?(_[0-9])?$")
|
||||
|
||||
val properties = getAllProperties(o).filter { it.startsWith("$base") }
|
||||
val distinctProperties = properties.mapNotNull { regex.match(it)?.groupValues?.get(1) }.distinct()
|
||||
val distinctProperties = properties.mapNotNull { regex.find(it)?.groupValues?.get(1) }.distinct()
|
||||
if (distinctProperties.size != 2) {
|
||||
fail("Two distinct properties expected, ${properties.size} occurred: " + properties)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user