Skip to content

Commit bee0935

Browse files
author
James Brundage
committed
test: Start-Htmx ( Fixes #7 )
Always using port 80 in GitHub workflow
2 parents 4486fec + 2c08c3d commit bee0935

File tree

1 file changed

+16
-7
lines changed

1 file changed

+16
-7
lines changed

HtmxPS.tests.ps1

+16-7
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,22 @@ describe HtmxPS {
1212
}
1313

1414
context 'Start-Htmx and Stop-Htmx' {
15-
it "Will start and stop a small htmx server" {
16-
$startedLocalJob = Start-Htmx -Htmx (
17-
htmx button "Click Me" hx-on:click="alert('Thanks, I needed that!')"
18-
)
19-
Invoke-RestMethod -Uri $startedLocalJob.ServerUrl
20-
$startedLocalJob | Stop-Htmx
21-
$startedLocalJob | Remove-Job
15+
it "Will start and stop a small htmx server" {
16+
if (-not $env:GITHUB_WORKSPACE) {
17+
$startedLocalJob = Start-Htmx -Htmx (
18+
htmx button "Click Me" hx-on:click="alert('Thanks, I needed that!')"
19+
)
20+
Invoke-RestMethod -Uri $startedLocalJob.ServerUrl
21+
$startedLocalJob | Stop-Htmx
22+
$startedLocalJob | Remove-Job
23+
} else {
24+
$startedLocalJob = Start-Htmx -Htmx (
25+
htmx button "Click Me" hx-on:click="alert('Thanks, I needed that!')"
26+
) -ServerUrl "http://127.0.0.1/"
27+
Invoke-RestMethod -Uri $startedLocalJob.ServerUrl
28+
$startedLocalJob | Stop-Htmx
29+
$startedLocalJob | Remove-Job
30+
}
2231
}
2332
}
2433
}

0 commit comments

Comments
 (0)