Skip to content

Commit a9a8941

Browse files
author
James Brundage
committed
test: HtmxPS initial testing ( Fixes #5 )
1 parent d7aa5c8 commit a9a8941

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

HtmxPS.tests.ps1

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
describe HtmxPS {
2+
context 'Get-Htmx' {
3+
it "may help you write htmx" {
4+
htmx button "click me" -hx-get "api/endpoint" -hx-swap "afterend" | Should -match '\<button.+?hx-get'
5+
}
6+
it "Will treat dictionaries as attributes" {
7+
htmx p @{style='font-size:3em'} @{class='container'} "Hello, World!" | Should -match 'style="font-size:3em"'
8+
}
9+
it "Will treat input as content" {
10+
"Hello World" | htmx div hx-on:click "alert('Hello, World!')"
11+
}
12+
}
13+
}

0 commit comments

Comments
 (0)