;; AUTO-GENERATED from spec/tests/hyperscript-upstream-tests.json
;; DO NOT EDIT — regenerate with:
;;   python3 tests/playwright/generate-sx-tests.py --emit-pages

(defcomp ()
  (~docs/page :title "Hyperscript: asyncError (2 tests — 0 runnable)"
    (p :style "color:#57534e;margin-bottom:1rem" "Live cards for the upstream asyncError tests. 0 of 2 are reproducible in-browser; the remainder show their source for reference.")
    (p :style "color:#78716c;font-size:0.875rem;margin-bottom:1rem"
      "Theme: " (a :href "/sx/(applications.(hyperscript.gallery-events))"
        :style "color:#7c3aed" "events"))
    (div :style "display:flex;flex-direction:column"
      (~hyperscript/hs-test-card
  :name "rejected promise stops execution"
  :html "<button _=\"on click
				call failAsync()
				put 'should not reach' into #out
			\">Go</button>
			<div id='out'>original</div>"
  :action "find('button').click()"
  :check "toHaveText(\"original\")"
  :run-src "(fn (sandbox) (error \"not yet runnable in gallery — see test suite\"))")
(~hyperscript/hs-test-card
  :name "rejected promise triggers catch block"
  :html "<button _=\"on click
				call failAsync()
				put 'unreachable' into #out
			catch e
				put e.message into #out
			\">Go</button>
			<div id='out'></div>"
  :action "find('button').click()"
  :check "toHaveText(\"boom\")"
  :run-src "(fn (sandbox) (error \"not yet runnable in gallery — see test suite\"))"))))
