Step 17: streaming render — hyperscript enhancements, WASM builds, live server tests
Streaming chunked transfer with shell-first suspense and resolve scripts. Hyperscript parser/compiler/runtime expanded for conformance. WASM static assets added to OCaml host. Playwright streaming and page-level test suites. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
31
sx/sx/streaming-demo.test.sx
Normal file
31
sx/sx/streaming-demo.test.sx
Normal file
@@ -0,0 +1,31 @@
|
||||
;; Page test for /sx/(geography.(isomorphism.streaming))
|
||||
;;
|
||||
;; The streaming page sends an HTML shell immediately with suspense
|
||||
;; skeletons, then resolves three slots at staggered delays (1s, 3s, 5s).
|
||||
;; Single navigation test — streaming pages block the server during IO,
|
||||
;; so multiple navigations in one suite would queue.
|
||||
|
||||
(defsuite
|
||||
"streaming-demo"
|
||||
:url "/sx/(geography.(isomorphism.streaming))"
|
||||
:stream true
|
||||
:timeout 60000
|
||||
(deftest
|
||||
"streaming page renders and resolves"
|
||||
(wait-for "h1" :text "Streaming" :timeout 30000)
|
||||
(assert-count "[data-suspense]" 3 :timeout 30000)
|
||||
(wait-for
|
||||
"[data-suspense='stream-fast']"
|
||||
:text "Fast source"
|
||||
:timeout 30000)
|
||||
(wait-for
|
||||
"[data-suspense='stream-medium']"
|
||||
:text "Medium source"
|
||||
:timeout 30000)
|
||||
(wait-for
|
||||
"[data-suspense='stream-slow']"
|
||||
:text "Slow source"
|
||||
:timeout 30000)
|
||||
(wait-for "[data-suspense='stream-fast']" :text "~1s" :timeout 5000)
|
||||
(wait-for "[data-suspense='stream-medium']" :text "~3s" :timeout 5000)
|
||||
(wait-for "[data-suspense='stream-slow']" :text "~5s" :timeout 5000)))
|
||||
Reference in New Issue
Block a user