(defsuite
  "hs-diag"
  (deftest
    "put into #id compiled"
    (let
      ((sx (hs-to-sx-from-source "on click put \"foo\" into #d1")))
      (assert=
        (serialize sx)
        "(hs-on me \"click\" (fn (event) (hs-set-inner-html! (hs-query-first \"#d1\") \"foo\")))")))
  (deftest
    "put into #id works"
    (let
      ((el (dom-create-element "div")))
      (dom-set-attr el "id" "d1")
      (dom-set-attr el "_" "on click put \"foo\" into #d1")
      (dom-append (dom-body) el)
      (hs-activate! el)
      (dom-dispatch el "click" nil)
      (assert= (dom-text-content el) "foo"))))