似乎我无法shouldMatchJson
从 Kotlintest v3.4.2 访问匹配器,这种方式记录在https://github.com/kotlintest/kotlintest/blob/master/doc/matchers.md中。我得到未解决的参考,我似乎无法导入它。代码说它是 String 类的扩展方法,但尝试使用字符串甚至 """{}""" 但无法访问该方法。难道我做错了什么?所有其他匹配器都可以。
class Test : StringSpec ({
"Test a json" {
"{}".shouldMatchJson("{}")
}
})