Skip to content

Commit 2142670

Browse files
committed
include anchor and querystring test on hx-get
1 parent 076f450 commit 2142670

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tests/Elastic.Markdown.Tests/Inline/AnchorLinkTests.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,11 @@ public void GeneratesHtml() =>
7878
"""<p><a href="/docs/testing/req#sub-requirements" hx-get="/docs/testing/req#sub-requirements" hx-select-oob="#content-container,#toc-nav" hx-swap="none" hx-push-url="true" hx-indicator="#htmx-indicator" preload="mousedown">Sub Requirements</a></p>"""
7979
);
8080

81+
[Fact]
82+
public void HxGetContainsVersionAnchor() =>
83+
// language=html
84+
Html.Should().MatchRegex("""hx-get="/docs/testing/req\?v=(.+?)#sub-requirements""");
85+
8186
[Fact]
8287
public void HasNoErrors() => Collector.Diagnostics.Should().HaveCount(0);
8388
}

0 commit comments

Comments
 (0)