kotest-assertions / io.kotest.assertions / intellijFormatError

intellijFormatError

fun intellijFormatError(expected: Expected, actual: Actual): String

Returns a message formatted appropriately for intellij to show a diff.

This is the format intellij requires to recognize: https://github.com/JetBrains/intellij-community/blob/5422868682d7eb8511dda02cf615ff375f5b0324/java/java-runtime/src/com/intellij/rt/execution/testFrameworks/AbstractExpectedPatterns.java

From the above link: private static final Pattern ASSERT_EQUALS_PATTERN = Pattern.compile("expected:<(.)> but was:<(.)>", Pattern.DOTALL | Pattern.CASE_INSENSITIVE);