Skip to main content
Version: 5.9 🚧

YAML

To use these matchers add testImplementation("io.kotest:kotest-assertions-yaml:<version>") to your build.

Basic matchers​

MatcherDescriptionTargets
shouldBeValidYamlverifies that a given string parses to valid YAMLMultiplatform
shouldNotBeValidYamlverifies that a given not string parses to valid YAMLMultiplatform

Content-based matching​

MatcherDescriptionTargets
shouldEqualYamlVerifies that a String matches a given YAML.Multiplatform
shouldNotEqualYamlVerifies that a String not matches a given YAML.Multiplatform