Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Novaunit Laravel Package

quotevelocity/novaunit

NovaUnit brings a PHPUnit-friendly testing layer to Laravel Nova, letting you unit test resources, fields, actions, filters, lenses, and metrics without a browser. Write expressive assertions for Nova components right inside your existing test suite.

View on GitHub
Deep Wiki
Context7

QuoteVelocity NovaUnit brings first-class unit testing to Laravel Nova. It provides fluent PHPUnit helpers and assertions for testing Nova fields, actions, filters, lenses, and metrics without booting a full browser or HTTP request, so you can verify component configuration and behavior quickly and reliably.

  • Fluent assertions for Nova fields, actions, filters, lenses, and metrics
  • Test component configuration and behavior in isolation
  • PHPUnit-ready helpers that keep tests concise and readable
  • Integrates cleanly with existing Laravel/Nova test suites
  • Faster feedback than end-to-end or browser-based tests
Frequently asked questions about Novaunit
What is NovaUnit and how does it help test Laravel Nova components?
NovaUnit is a dev-only PHPUnit helper package for Laravel Nova. It provides fluent assertions for Nova fields, actions, filters, lenses, and metrics so you can verify component configuration and behavior in isolation. It avoids browser and HTTP request cycles, giving faster feedback than end-to-end tests. It is designed to integrate with existing Laravel and Nova test suites.
How do I install NovaUnit in a Laravel app?
Install it as a pinned dev dependency with Composer, but first confirm the canonical package name in the repository's composer.json because the overview and repository names differ. Every CI runner must authenticate to Nova's credential-gated Composer repository before installs will work. Add a tests/Nova testsuite and a thin app-owned base TestCase that extends NovaUnit's base case. Check composer.json rather than the README for the supported version matrix.
Does NovaUnit support Pest or only PHPUnit?
NovaUnit is described as PHPUnit-ready and extends PHPUnit rather than introducing a new test runner. Pest support is claimed but not first-class, so a Pest-first codebase risks a split testing idiom. Validate Pest interop end-to-end with one real test before standardizing on it. If Pest compatibility is essential, keep the base test case thin so the package remains swappable.
Which Nova, PHP, and PHPUnit versions does NovaUnit support?
The supported compatibility matrix is not established in the available documentation and should be read from the package's composer.json, not the README. Documentation often lags at this adoption level, so source constraints are authoritative. Confirm your Laravel Nova major, PHP version, and PHPUnit major against those constraints before the spike. If no compatible release exists for your stack, treat that as a fork or defer trigger.
What Nova components can I unit test with NovaUnit?
NovaUnit provides fluent assertions for Nova fields, actions, filters, lenses, and metrics. You can test component configuration and behavior in isolation without booting a full browser or HTTP request. This is most valuable when you own non-trivial custom Nova components with reactive fields, authorization logic, query filters, or side effects. If your Nova usage is config-only, there is little at this layer to test.
Can I test Laravel Nova without a browser using NovaUnit?
Yes. NovaUnit is designed for unit-level component tests, so it does not require a browser or a full HTTP request cycle. That makes tests faster and more precise than end-to-end or browser-based tests. It complements rather than replaces existing feature tests, and you can retrofit HTTP-driven Nova tests opportunistically.
Is NovaUnit safe to use in production?
NovaUnit is a dev-only Composer dependency that lives entirely in the test harness. It has no production runtime footprint, no shipping code, and no data-layer or request-path changes, so adopting it is architecturally low-consequence and trivially reversible. Keep it in require-dev and pin an exact version. Production behavior is unaffected; the risk sits in test maintenance when Nova internals change.
How do I add NovaUnit tests to an existing Laravel test suite?
Do not convert everything at once. Stand up a new tests/Nova testsuite alongside tests/Feature, with one app-owned base TestCase that extends NovaUnit's base case. That base class is your migration seam: if you abandon the package, you rewrite one file rather than hundreds of tests. Retrofit individual HTTP-driven Nova feature tests when an engineer is already touching them.
Is NovaUnit maintained, and what are the alternatives?
Adoption signal is thin: 9 stars, 0 dependents, a single maintainer, MIT license, and a release date that should be treated as unverified. The dominant technical risk is structural because NovaUnit reaches into Nova internals, so a Nova minor release can break the harness and the thing it tests at the same time. The practical alternatives are continuing with browser or HTTP-driven Nova feature tests or forking the package, which is viable because it is MIT and dev-only. Pin an exact version, keep the base test case thin, and write down a fork trigger in advance.
How do I handle CI authentication for NovaUnit installs?
Laravel Nova is distributed through a credential-gated Composer repository, so every CI runner must authenticate before installing NovaUnit or Nova itself. Treat this as a shared-secret and procurement task, and resolve it before the spike rather than during rollout. Confirm that local, staging, and CI environments can all fetch the package. If runners cannot authenticate today, that blocks adoption regardless of NovaUnit's merits.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core