aboutsummaryrefslogtreecommitdiff
path: root/plugins/base
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/base')
-rw-r--r--plugins/base/base-test-utils/build.gradle.kts2
-rw-r--r--plugins/base/base-test-utils/src/main/kotlin/utils/assertHtmlEqualsIgnoringWhitespace.kt6
-rw-r--r--plugins/base/build.gradle.kts2
3 files changed, 6 insertions, 4 deletions
diff --git a/plugins/base/base-test-utils/build.gradle.kts b/plugins/base/base-test-utils/build.gradle.kts
index 8be9a0db..3ae15b3e 100644
--- a/plugins/base/base-test-utils/build.gradle.kts
+++ b/plugins/base/base-test-utils/build.gradle.kts
@@ -3,7 +3,7 @@ import org.jetbrains.registerDokkaArtifactPublication
dependencies {
compileOnly(project(":plugins:base"))
implementation(project(":core:test-api"))
- implementation("org.jsoup:jsoup:1.12.1")
+ implementation("org.jsoup:jsoup:1.13.1")
implementation(kotlin("test-junit"))
}
diff --git a/plugins/base/base-test-utils/src/main/kotlin/utils/assertHtmlEqualsIgnoringWhitespace.kt b/plugins/base/base-test-utils/src/main/kotlin/utils/assertHtmlEqualsIgnoringWhitespace.kt
index f8ef8a41..95dcae4e 100644
--- a/plugins/base/base-test-utils/src/main/kotlin/utils/assertHtmlEqualsIgnoringWhitespace.kt
+++ b/plugins/base/base-test-utils/src/main/kotlin/utils/assertHtmlEqualsIgnoringWhitespace.kt
@@ -2,15 +2,17 @@ package utils
import junit.framework.Assert.assertEquals
import org.jsoup.Jsoup
+import org.jsoup.nodes.Document
/**
* Parses it using JSOUP, trims whitespace at the end of the line and asserts if they are equal
* parsing is required to unify the formatting
*/
fun assertHtmlEqualsIgnoringWhitespace(expected: String, actual: String) {
+ val ignoreFormattingSettings = Document.OutputSettings().indentAmount(0).outline(true)
assertEquals(
- Jsoup.parse(expected).outerHtml().trimSpacesAtTheEndOfLine(),
- Jsoup.parse(actual).outerHtml().trimSpacesAtTheEndOfLine()
+ Jsoup.parse(expected).outputSettings(ignoreFormattingSettings).outerHtml().trimSpacesAtTheEndOfLine(),
+ Jsoup.parse(actual).outputSettings(ignoreFormattingSettings).outerHtml().trimSpacesAtTheEndOfLine()
)
}
diff --git a/plugins/base/build.gradle.kts b/plugins/base/build.gradle.kts
index 8794925a..1281ac3f 100644
--- a/plugins/base/build.gradle.kts
+++ b/plugins/base/build.gradle.kts
@@ -9,7 +9,7 @@ dependencies {
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutines_version")
api(project(":kotlin-analysis"))
- implementation("org.jsoup:jsoup:1.12.1")
+ implementation("org.jsoup:jsoup:1.13.1")
implementation("com.fasterxml.jackson.module:jackson-module-kotlin:2.11.1")
testImplementation(project(":plugins:base:base-test-utils"))
testImplementation(project(":core:content-matcher-test-utils"))