test(build): harden convention diagnostics
Exercise malformed static policy, client module/event/state, confirmation, SSE, delay, throttle, and mixed-event values so build-time diagnostics fail closed across the public declarative surface. req: diagnostics/004 req: convention/006 req: client_local/011
This commit is contained in:
@@ -3156,6 +3156,84 @@ fn main() {{
|
||||
"data-hemx-policy",
|
||||
"latest",
|
||||
),
|
||||
(
|
||||
"empty-client",
|
||||
r#"<button data-hemx-client="">Save</button>"#,
|
||||
"data-hemx-client",
|
||||
"non-empty",
|
||||
),
|
||||
(
|
||||
"client-module-scheme",
|
||||
r#"<main data-hemx-root="app" data-hemx-client-module="https://example.com/app.js"></main>"#,
|
||||
"data-hemx-client-module",
|
||||
"same-origin",
|
||||
),
|
||||
(
|
||||
"client-event",
|
||||
r#"<button data-hemx-client="save" data-hemx-client-event="blur">Save</button>"#,
|
||||
"data-hemx-client-event",
|
||||
"runtime-supported",
|
||||
),
|
||||
(
|
||||
"client-version-zero",
|
||||
r#"<button data-hemx-client="save" data-hemx-client-state-version="0">Save</button>"#,
|
||||
"data-hemx-client-state-version",
|
||||
"positive",
|
||||
),
|
||||
(
|
||||
"client-version-invalid",
|
||||
r#"<button data-hemx-client="save" data-hemx-client-state-version="one">Save</button>"#,
|
||||
"data-hemx-client-state-version",
|
||||
"positive",
|
||||
),
|
||||
(
|
||||
"client-policy-invalid",
|
||||
r#"<button data-hemx-client="save" data-hemx-client-policy="queue">Save</button>"#,
|
||||
"data-hemx-client-policy",
|
||||
"latest",
|
||||
),
|
||||
(
|
||||
"events-mixed",
|
||||
r#"<button data-hemx-handle="save" data-hemx-on="click blur">Save</button>"#,
|
||||
"data-hemx-on",
|
||||
"runtime-supported",
|
||||
),
|
||||
(
|
||||
"confirm-empty",
|
||||
r#"<button data-hemx-handle="save" data-hemx-confirm=" ">Save</button>"#,
|
||||
"data-hemx-confirm",
|
||||
"non-empty",
|
||||
),
|
||||
(
|
||||
"sse-empty",
|
||||
r#"<main data-hemx-root="app" data-hemx-sse=" "></main>"#,
|
||||
"data-hemx-sse",
|
||||
"non-empty",
|
||||
),
|
||||
(
|
||||
"delay-empty",
|
||||
r#"<button data-hemx-handle="save" data-hemx-delay="">Save</button>"#,
|
||||
"data-hemx-delay",
|
||||
"milliseconds",
|
||||
),
|
||||
(
|
||||
"throttle-invalid",
|
||||
r#"<button data-hemx-handle="save" data-hemx-throttle="ms">Save</button>"#,
|
||||
"data-hemx-throttle",
|
||||
"milliseconds",
|
||||
),
|
||||
(
|
||||
"duration-suffix-only",
|
||||
r#"<button data-hemx-handle="save" data-hemx-delay="s">Save</button>"#,
|
||||
"data-hemx-delay",
|
||||
"milliseconds",
|
||||
),
|
||||
(
|
||||
"policy-duplicate-anchor",
|
||||
r#"<button data-hemx-handle="save" data-hemx-policy="newest">Save</button>"#,
|
||||
"data-hemx-policy",
|
||||
"latest",
|
||||
),
|
||||
(
|
||||
"debounce",
|
||||
r#"<button data-hemx-handle="save" data-hemx-debounce="soon">Save</button>"#,
|
||||
|
||||
Reference in New Issue
Block a user