HS tests: add eval-hs helper, fix no/mathOperator/evalStatically suites
- eval-hs: new test helper that compiles+evaluates a HS expression and returns its result. Uses hs-to-sx-from-source with "return " prefix. - Generator now emits eval-hs calls for expression-only tests - no suite: 4/5 pass (was 0/5) - evalStatically: 5/8 pass (was 0/8 stubs) - pick: 7/7 pass (was 0/7 stubs) - mathOperator: 3/5 pass (type issues on array concat) 477/831 (57.4%), +69 from session baseline of 408. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -16,6 +16,15 @@
|
||||
(fn ()
|
||||
(dom-set-inner-html (dom-body) "")))
|
||||
|
||||
;; Evaluate a hyperscript expression and return its result.
|
||||
;; Compiles the expression, wraps in a thunk, evaluates, returns result.
|
||||
(define eval-hs
|
||||
(fn (src)
|
||||
(let ((sx (hs-to-sx-from-source (str "return " src))))
|
||||
(let ((handler (eval-expr-cek
|
||||
(list (quote fn) (list (quote me)) (list (quote let) (list (list (quote it) nil) (list (quote event) nil)) sx)))))
|
||||
(handler nil)))))
|
||||
|
||||
;; ── add (19 tests) ──
|
||||
(defsuite "hs-upstream-add"
|
||||
(deftest "can add class ref on a single div"
|
||||
|
||||
Reference in New Issue
Block a user