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:
@@ -396,6 +396,9 @@ globalThis.prompt = function(_msg){
|
||||
globalThis.Event=Ev; globalThis.CustomEvent=Ev; globalThis.NodeList=Array; globalThis.HTMLCollection=Array;
|
||||
globalThis.getComputedStyle=(e)=>e?e.style:{}; globalThis.requestAnimationFrame=(f)=>{f();return 0;};
|
||||
globalThis.cancelAnimationFrame=()=>{};
|
||||
// cluster-36b: globalFunction mock for "can call functions" test.
|
||||
// The test calls globalFunction("foo") via hyperscript and checks window.calledWith.
|
||||
globalThis.globalFunction = function(x) { globalThis.calledWith = x; };
|
||||
// HsMutationObserver — cluster-32 mutation mock. Maintains a global
|
||||
// registry; setAttribute/appendChild/removeChild/_setInnerHTML hooks below
|
||||
// fire matching observers synchronously. A re-entry guard
|
||||
|
||||
Reference in New Issue
Block a user