Testing
Library tests
Section titled “Library tests”./gradlew :kona-inertia:test :kona-inertia:koverVerifyCI enforces 100% line and branch coverage on production code.
Patterns
Section titled “Patterns”@AfterEachfun tearDown() { Inertia.reset() Vite.reset() Kona.reset()}Drive the kernel:
val app = Kona.create(arrayOf("--base=$temp")) .providers(HttpServiceProvider(), InertiaServiceProvider()) .boot()app.resolve(HttpKernel::class.java).pushMiddleware(HandleInertiaRequests())val response = app.resolve(HttpKernel::class.java).handle( Request("GET", "/", headers = mapOf("X-Inertia" to "true")),)Samples
Section titled “Samples”:inertia-sample-kotlin:test and :inertia-sample-java:test exercise HTML + JSON visits with shared props.