feat(compat): sweep of components against the real core with strict diagnostics
This commit is contained in:
Executable
+19
@@ -0,0 +1,19 @@
|
||||
#!/usr/bin/env bash
|
||||
# Smoke HTTP del paquete htmx. Recibe BASE, PKG, RESULTS.
|
||||
set -u
|
||||
|
||||
check() {
|
||||
local comp="$1" path="$2" expect="$3" body
|
||||
if ! body="$(curl -fsS "$BASE$path" 2>/dev/null)"; then
|
||||
echo "$PKG:$comp|fail" >> "$RESULTS"; return
|
||||
fi
|
||||
if printf '%s' "$body" | grep -qF "$expect"; then
|
||||
echo "$PKG:$comp|ok" >> "$RESULTS"
|
||||
else
|
||||
echo " inesperado en $path: $(printf '%s' "$body" | head -c 200)" >&2
|
||||
echo "$PKG:$comp|fail" >> "$RESULTS"
|
||||
fi
|
||||
}
|
||||
|
||||
check htmlComponent /compat/htmx/render '<h1 id="compat-greet">A<b></h1>'
|
||||
check htmx /compat/htmx/static 'HTMX:false:true'
|
||||
Reference in New Issue
Block a user