Testing your app

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.