;; 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: asExpression (17 tests — 0 runnable)"
    (p :style "color:#57534e;margin-bottom:1rem" "Live cards for the upstream asExpression tests. 0 of 17 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-expressions))"
        :style "color:#7c3aed" "expressions"))
    (div :style "display:flex;flex-direction:column"
      (~hyperscript/hs-test-card
  :name "converts value as Boolean"
  :html ""
  :action "await run(\"1 as Boolean\"; await run(\"0 as Boolean\"; await run(\"'; await run(\"'"
  :check ""
  :run-src "(fn (sandbox) (error \"not yet runnable in gallery — see test suite\"))")
(~hyperscript/hs-test-card
  :name "can use the a modifier if you like"
  :html ""
  :action ""
  :check "toBe(new Date(1)"
  :run-src "(fn (sandbox) (error \"not yet runnable in gallery — see test suite\"))")
(~hyperscript/hs-test-card
  :name "parses string as JSON to object"
  :html ""
  :action "await run('\\'"
  :check "toBe(\"bar\")"
  :run-src "(fn (sandbox) (error \"not yet runnable in gallery — see test suite\"))")
(~hyperscript/hs-test-card
  :name "converts value as JSONString"
  :html ""
  :action "await run(\"{foo:'"
  :check "toBe('{\"foo\":\"bar\"}')"
  :run-src "(fn (sandbox) (error \"not yet runnable in gallery — see test suite\"))")
(~hyperscript/hs-test-card
  :name "pipe operator chains conversions"
  :html ""
  :action "await run(\"{foo:'"
  :check "toBe(\"bar\")"
  :run-src "(fn (sandbox) (error \"not yet runnable in gallery — see test suite\"))")
(~hyperscript/hs-test-card
  :name "can use the an modifier if you'd like"
  :html ""
  :action "await run('\\'"
  :check "toBe(\"bar\")"
  :run-src "(fn (sandbox) (error \"not yet runnable in gallery — see test suite\"))")
(~hyperscript/hs-test-card
  :name "collects duplicate text inputs into an array"
  :html ""
  :action "evaluate({...})"
  :check "toEqual([\"alpha\", \"beta\", \"gamma\"])"
  :run-src "(fn (sandbox) (error \"not yet runnable in gallery — see test suite\"))")
(~hyperscript/hs-test-card
  :name "converts multiple selects with programmatically changed selections"
  :html ""
  :action "evaluate({...})"
  :check "toBe(\"cat\"); toBe(\"raccoon\")"
  :run-src "(fn (sandbox) (error \"not yet runnable in gallery — see test suite\"))")
(~hyperscript/hs-test-card
  :name "converts a form element into Values | JSONString"
  :html ""
  :action "evaluate({...})"
  :check "toBe('{\"firstName\":\"John\",\"lastName\":\"Connor\",\"areaCode\":\"213\",\"phone\":\"555-1212\"}')"
  :run-src "(fn (sandbox) (error \"not yet runnable in gallery — see test suite\"))")
(~hyperscript/hs-test-card
  :name "converts a form element into Values | FormEncoded"
  :html ""
  :action "evaluate({...})"
  :check "toBe('firstName=John&lastName=Connor&areaCode=213&phone=555-1212')"
  :run-src "(fn (sandbox) (error \"not yet runnable in gallery — see test suite\"))")
(~hyperscript/hs-test-card
  :name "converts array as Set"
  :html ""
  :action ""
  :check "toBe(true); toBe(3)"
  :run-src "(fn (sandbox) (error \"not yet runnable in gallery — see test suite\"))")
(~hyperscript/hs-test-card
  :name "converts object as Map"
  :html ""
  :action ""
  :check "toBe(true); toBe(1); toBe(2)"
  :run-src "(fn (sandbox) (error \"not yet runnable in gallery — see test suite\"))")
(~hyperscript/hs-test-card
  :name "converts object as Keys"
  :html ""
  :action "await run(\"{a:1, b:2} as Keys\""
  :check "toEqual([\"a\", \"b\"])"
  :run-src "(fn (sandbox) (error \"not yet runnable in gallery — see test suite\"))")
(~hyperscript/hs-test-card
  :name "converts object as Entries"
  :html ""
  :action "await run(\"{a:1} as Entries\""
  :check "toEqual([[\"a\", 1]])"
  :run-src "(fn (sandbox) (error \"not yet runnable in gallery — see test suite\"))")
(~hyperscript/hs-test-card
  :name "converts array as Reversed"
  :html ""
  :action "await run(\"[1,2,3] as Reversed\""
  :check "toEqual([3, 2, 1])"
  :run-src "(fn (sandbox) (error \"not yet runnable in gallery — see test suite\"))")
(~hyperscript/hs-test-card
  :name "converts array as Unique"
  :html ""
  :action "await run(\"[1,2,2,3,3] as Unique\""
  :check "toEqual([1, 2, 3])"
  :run-src "(fn (sandbox) (error \"not yet runnable in gallery — see test suite\"))")
(~hyperscript/hs-test-card
  :name "converts nested array as Flat"
  :html ""
  :action "await run(\"[[1,2],[3,4]] as Flat\""
  :check "toEqual([1, 2, 3, 4])"
  :run-src "(fn (sandbox) (error \"not yet runnable in gallery — see test suite\"))"))))
