67 lines
2.4 KiB
Forth
67 lines
2.4 KiB
Forth
module Common
|
|
|
|
open Expecto
|
|
open Giraffe.Htmx
|
|
|
|
/// Test to ensure the version was updated
|
|
let version =
|
|
test "HtmxVersion is correct" {
|
|
Expect.equal HtmxVersion "4.0.0-alpha6" "htmx version incorrect"
|
|
}
|
|
|
|
/// Tests for the HxSwap module
|
|
let swap =
|
|
testList "HxSwap" [
|
|
test "InnerHtml is correct" {
|
|
Expect.equal HxSwap.InnerHtml "innerHTML" "Inner HTML swap value incorrect"
|
|
}
|
|
test "OuterHtml is correct" {
|
|
Expect.equal HxSwap.OuterHtml "outerHTML" "Outer HTML swap value incorrect"
|
|
}
|
|
test "InnerMorph is correct" {
|
|
Expect.equal HxSwap.InnerMorph "innerMorph" "Inner Morph swap value incorrect"
|
|
}
|
|
test "OuterMorph is correct" {
|
|
Expect.equal HxSwap.OuterMorph "innerMorph" "Outer Morph swap value incorrect"
|
|
}
|
|
test "TextContent is correct" {
|
|
Expect.equal HxSwap.TextContent "textContent" "Text Content swap value incorrect"
|
|
}
|
|
test "Before is correct" {
|
|
Expect.equal HxSwap.Before "before" "Before swap value incorrect"
|
|
}
|
|
test "BeforeBegin is correct" {
|
|
Expect.equal HxSwap.BeforeBegin HxSwap.Before "Before Begin swap value incorrect"
|
|
}
|
|
test "Prepend is correct" {
|
|
Expect.equal HxSwap.Prepend "prepend" "Prepend swap value incorrect"
|
|
}
|
|
test "AfterBegin is correct" {
|
|
Expect.equal HxSwap.AfterBegin HxSwap.Prepend "Prepend swap value incorrect"
|
|
}
|
|
test "Append is correct" {
|
|
Expect.equal HxSwap.Append "append" "Append swap value incorrect"
|
|
}
|
|
test "BeforeEnd is correct" {
|
|
Expect.equal HxSwap.BeforeEnd HxSwap.Append "Before End swap value incorrect"
|
|
}
|
|
test "After is correct" {
|
|
Expect.equal HxSwap.After "after" "After swap value incorrect"
|
|
}
|
|
test "AfterEnd is correct" {
|
|
Expect.equal HxSwap.AfterEnd HxSwap.After "After End swap value incorrect"
|
|
}
|
|
test "Delete is correct" {
|
|
Expect.equal HxSwap.Delete "delete" "Delete swap value incorrect"
|
|
}
|
|
test "None is correct" {
|
|
Expect.equal HxSwap.None "none" "None swap value incorrect"
|
|
}
|
|
test "Upsert is correct" {
|
|
Expect.equal HxSwap.Upsert "upsert" "Upsert swap value incorrect"
|
|
}
|
|
]
|
|
|
|
/// All tests for this module
|
|
let allTests = testList "Htmx.Common" [ version; swap ]
|