diff --git a/spec/tests/test-hyperscript-behavioral.sx b/spec/tests/test-hyperscript-behavioral.sx index cbc7d226..42570e66 100644 --- a/spec/tests/test-hyperscript-behavioral.sx +++ b/spec/tests/test-hyperscript-behavioral.sx @@ -1134,9 +1134,11 @@ ;; ── breakpoint (2 tests) ── (defsuite "hs-upstream-breakpoint" (deftest "parses as a top-level command" - (error "SKIP (untranslated): parses as a top-level command")) + (hs-compile "breakpoint") + ) (deftest "parses inside an event handler" - (error "SKIP (untranslated): parses inside an event handler")) + (hs-compile "on click breakpoint end") + ) ) ;; ── call (6 tests) ── diff --git a/tests/playwright/generate-sx-tests.py b/tests/playwright/generate-sx-tests.py index 505ecf05..e5099511 100644 --- a/tests/playwright/generate-sx-tests.py +++ b/tests/playwright/generate-sx-tests.py @@ -2551,6 +2551,15 @@ def generate_eval_only_test(test, idx): hs_expr = extract_hs_expr(m.group(2)) assertions.append(f' (assert-throws (fn () (eval-hs "{hs_expr}")))') + # Pattern 4: error("expr").toBeNull() — parsing/eval must not throw + if not assertions: + for m in re.finditer( + r'error\((["\x27])(.+?)\1\).*?toBeNull\(\)', + body, re.DOTALL + ): + hs_expr = extract_hs_expr(m.group(2)) + assertions.append(f' (hs-compile "{hs_expr}")') + if not assertions: return None # Can't convert this body pattern