Update script/tags for 2.0.10

This commit is contained in:
2026-07-03 19:37:59 -04:00
parent 8f93aa4d35
commit a3f16f5087
11 changed files with 168 additions and 207 deletions
+7 -7
View File
@@ -610,7 +610,7 @@ let hxTrigger =
testList "FromDocument" [
test "succeeds when it is the first modifier" {
Expect.equal (HxTrigger.FromDocument "") "from:document" "FromDocument modifier incorrect"
}
}
test "succeeds when it is not the first modifier" {
Expect.equal (HxTrigger.FromDocument "click") "click from:document" "FromDocument modifier incorrect"
}
@@ -715,7 +715,7 @@ let hxVals =
]
]
/// Pipe-able assertion for a rendered node
/// Pipe-able assertion for a rendered node
let shouldRender expected node =
Expect.equal (RenderView.AsString.htmlNode node) expected "Rendered HTML incorrect"
@@ -858,14 +858,14 @@ let script =
let html = RenderView.AsString.htmlNode Script.cdnMinified
Expect.equal
html
$"""<script src="https://cdn.jsdelivr.net/npm/htmx.org@{HtmxVersion}/dist/htmx.min.js" integrity="sha256-Iig+9oy3VFkU8KiKG97cclanA9HVgMHSVSF9ClDTExM=" crossorigin="anonymous"></script>"""
$"""<script src="https://cdn.jsdelivr.net/npm/htmx.org@{HtmxVersion}/dist/htmx.min.js" integrity="sha384-H5SrcfygHmAuTDZphMHqBJLc3FhssKjG7w/CeCpFReSfwBWDTKpkzPP8c+cLsK+V" crossorigin="anonymous"></script>"""
"CDN minified script tag is incorrect"
}
test "cdnUnminified succeeds" {
let html = RenderView.AsString.htmlNode Script.cdnUnminified
Expect.equal
html
$"""<script src="https://cdn.jsdelivr.net/npm/htmx.org@{HtmxVersion}/dist/htmx.js" integrity="sha256-upUwYnay6R+DA68rROTAP+EdfO3NvOqtE513PgDyAYM=" crossorigin="anonymous"></script>"""
$"""<script src="https://cdn.jsdelivr.net/npm/htmx.org@{HtmxVersion}/dist/htmx.js" integrity="sha384-Q+Dky3iHVJOr6wUjQ4ulh6uQ76an/t+ak1+PjMVaxRjbZamFLAG+u9InkfjbsEQf" crossorigin="anonymous"></script>"""
"CDN unminified script tag is incorrect"
}
]
@@ -875,11 +875,11 @@ open System.Text
/// Tests for the RenderFragment module
let renderFragment =
testList "RenderFragment" [
/// Validate that the two object references are the same object
let isSame obj1 obj2 message =
Expect.isTrue (obj.ReferenceEquals(obj1, obj2)) message
testList "findIdNode" [
test "fails with a Text node" {
Expect.isNone (RenderFragment.findIdNode "blue" (Text "")) "There should not have been a node found"
@@ -945,7 +945,7 @@ let renderFragment =
]
]
testList "AsBytes" [
/// Alias for UTF-8 encoding
let utf8 = Encoding.UTF8