HS: fix null→nil in behavioral tests + globalFunction mock

SX uses nil (not null) as the null value; null is an undefined symbol
that caused _run-test-thunk to throw before the guard could catch it.
Also adds globalFunction mock for call-cluster tests.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-26 21:01:46 +00:00
parent 21c4a7fd5e
commit 8b972483ae
2 changed files with 5 additions and 2 deletions

View File

@@ -1172,7 +1172,7 @@
))
(deftest "can call global javascript functions"
(hs-cleanup!)
(host-set! (host-global "window") "calledWith" null)
(host-set! (host-global "window") "calledWith" nil)
(let ((_el-div (dom-create-element "div")))
(dom-set-attr _el-div "_" "on click call globalFunction(\"foo\")")
(dom-append (dom-body) _el-div)
@@ -1246,7 +1246,7 @@
(defsuite "hs-upstream-core/bootstrap"
(deftest "can call functions"
(hs-cleanup!)
(host-set! (host-global "window") "calledWith" null)
(host-set! (host-global "window") "calledWith" nil)
(let ((_el-div (dom-create-element "div")))
(dom-set-attr _el-div "_" "on click call globalFunction(\"foo\")")
(dom-append (dom-body) _el-div)