test(js): cover confirm dispatch guard

Cover data-slhx-confirm as a runtime convention boundary: confirmation happens before handler dispatch continues.

req: convention/004
This commit is contained in:
slhx agent
2026-05-25 22:55:11 +02:00
parent 227337caa4
commit 77b6aba336
+9
View File
@@ -9,6 +9,15 @@ fn runtime_posts_urlencoded_forms_by_default() {
assert!(source.contains("application/x-www-form-urlencoded;charset=UTF-8"));
}
#[test]
fn runtime_confirms_before_handler_dispatch() {
// req: convention/004
let source = slhx_js::RUNTIME_JS;
assert!(source.contains("el.getAttribute(\"data-slhx-confirm\") && !confirm(el.getAttribute(\"data-slhx-confirm\"))"));
assert!(source.contains("return;"));
}
#[test]
fn runtime_fetches_with_same_origin_credentials() {
// req: auth/005