inertia.testing builds requests the way the Inertia client sends them and reads the page object back out of a response, with no extra dependencies.
(require '[inertia.testing :as it])
(let [resp (app (it/inertia-request :get "/users" {:version "v1" :partial-component "Users/Index" :only [:stats]}))]
(get (it/page resp) "props"))
page works on both Inertia JSON responses and first-visit HTML responses.
Can you improve this documentation?Edit on GitHub
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |