diff --git a/hosts/ocaml/browser/test_wasm_native.js b/hosts/ocaml/browser/test_wasm_native.js index f8f3aa04..68ce9e98 100644 --- a/hosts/ocaml/browser/test_wasm_native.js +++ b/hosts/ocaml/browser/test_wasm_native.js @@ -219,7 +219,12 @@ async function main() { // The actual reactive-spread pattern: module-loaded function creates effect // that calls cek-call on a render-fn returning a spread, then applies attrs. assert('reactive-spread from module', - K.eval('(let ((el (dom-create-element "div" nil)) (d (list))) (with-island-scope (fn (x) (append! d x)) (fn () (reactive-spread el (fn () (~cssx/tw :tokens "text-center"))))) (host-get el "className"))'), + K.eval('(let ((el (dom-create-element "div" nil)) (d (list))) (with-island-scope (fn (x) (append! d x)) (fn () (reactive-spread el (fn () (~cssx/tw :tokens "text-center"))))) (dom-get-attr el "class"))'), + 'sx-text-center'); + + // Full hydration pattern: render-to-dom with CSSX inside island scope + assertIncludes('render-to-dom CSSX in island scope', + K.eval("(host-get (let ((d (list))) (with-island-scope (fn (x) (append! d x)) (fn () (render-to-dom '(div (~cssx/tw :tokens \"text-center font-bold\") \"hello\") (global-env) nil)))) \"outerHTML\")"), 'sx-text-center'); // Reactive: signal update propagation