claudiodekker/inertia-laravel-testing
Test helpers for Inertia.js apps in Laravel: assert Inertia responses, page components, props, and partial reloads without brittle manual checks.
inertia-laravel core." Hand-rolled assertion helpers are permanent maintenance debt; a dev-only dependency is not. But the archived status (last release Jan 2021) is decisive evidence that the ecosystem answer moved into core, so the correct "buy" is now core, and this repo is a reference implementation rather than a dependency.component + props on a response; verifying partial reloads and only prop filtering; locking shared props (auth, flash, validation errors); and pinning the backend/frontend data contract during upgrades (Inertia version bumps, Laravel major upgrades, design-system prop changes).composer remove, and therefore a low-stakes place to draw the line rather than a place to make an exception.Adopt only in a narrow legacy case:
inertia-laravel version predates the bundled assertInertia / AssertableInertia helpers, and you cannot upgrade that dependency this quarter.Look elsewhere — which is the default answer today:
inertia-laravel core already ships these helpers. This is the first thing to check; if core covers it, this package is a duplicate source of truth and should be dropped, not adopted.For executives: A small, free, dev-only testing utility that protects the Inertia frontend investment. It ships nothing to production, adds no runtime risk, and lets us verify page behavior in fast server-side tests instead of slow browser tests — faster, cheaper, safer releases. Cost is essentially zero. However: the project is archived as of 2021, and the same capability now lives in Inertia's own Laravel integration. So the recommendation is not "adopt this" — it's "standardize on the built-in helpers," and treat this repo as a documented pattern for how to write those assertions.
For engineering: It demonstrates fluent assertions over Inertia responses — component(), url(), prop counts and values, nested closures, etc() to permit shared props, missing() to prove lazy props are excluded on partial reloads — so we stop maintaining homegrown test macros and stop burning browser-test minutes on things PHP can assert. Integration was a single dev dependency plus a trait on the base test case. We should get the same ergonomics from core; where core's API differs, port the patterns, not the package.
Known risks to state plainly: (1) Archived and unmaintained — no security or compatibility fixes, and modern PHP/Laravel will likely break it; (2) namespace collision with Inertia\Testing\AssertableInertia, which now exists in core, so which class loads is ambiguous and debugging is confusing; (3) exhaustive-by-default assertions mean newly shared props break tests, which teams misread as flakiness. Mitigations: use core where available, pin exact versions if anything legacy must stay, keep the abstraction thin (a trait on TestCase, nothing deeper), and be able to delete it in an afternoon.
Recommendation: Do not introduce this package. Confirm what your inertia-laravel version already provides, adopt core's helpers, and use this repository's README and assertion patterns as the template for our base test case and prop-contract tests. If a legacy service is stuck on an old inertia-laravel, permit this only as a pinned stopgap with an owner and a removal date.
How can I help you explore Laravel packages today?