https://kotlinlang.org logo
#kotest
Title
# kotest
l

Lidonis Calhau

02/07/2023, 4:14 PM
Hello I am trying Json support in Kotest from https://kotest.io/docs/assertions/json/json-overview.html Is there support for ignoring some values like https://github.com/lukas-krecan/JsonUnit#ignoring-values ?
e

Emil Kantis

02/07/2023, 4:36 PM
Without knowing more about what you’re trying to accomplish I’d say you’re looking for
shouldEqualSpecifiedJson
It’ll let you easily ignore key value pairs by omitting them. Otherwise you could have a look at jsonSchema matches
l

Lidonis Calhau

02/07/2023, 4:40 PM
Ah yes thanks it’s the one I need
My test is green now 😄
12 Views