Liking cljdoc? Tell your friends :D

starfederation.datastar.clojure.adapter.test

Utilities providing a test SSEGenerator and a mock ->sse-response function.

Utilities providing a test SSEGenerator and a mock `->sse-response`
function.
raw docstring

->sse-genclj

(->sse-gen & _)

Returns a SSEGenerator whose starfederation.datastar.clojure.protocols/send-event! implementation is a stub that returns the event string instead of sending it.

Returns a SSEGenerator whose
[[starfederation.datastar.clojure.protocols/send-event!]] implementation
is a stub that returns the event string instead of sending it.
sourceraw docstring

->sse-responseclj

(->sse-response req {on-open ac/on-open :keys [status headers]})

Fake a sse-response, it returns the ring response map with the :status, :headers and :body keys sent.

The events sent with sse-gen during the on-open callback are recorded in a vector stored in an atom. This atom is provided as the value for the response's :body.

Fake a sse-response, it returns the ring response map with
the `:status`, `:headers` and `:body`  keys sent.

The events sent with sse-gen during the `on-open` callback are recorded in a
vector stored in an atom. This atom is provided as the value for the
response's `:body`.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close