Testing workflows and automated quality checks. All test commands run inside
the isolated mtav-testing Docker environment — see
docker/README.md for the infrastructure details.
./mtav pest [args] # PHP tests (Pest) — default: Arch, Unit, Feature suites
./mtav vitest [args] # Vue tests (Vitest)
./mtav e2e [args] # Browser journeys (Playwright) — pre-deployment safety net
./mtav precommit # Pest (minus 'slow' group) + Vitest in one env cycle
./mtav test # Everything: Pest + Vitest + E2EPest/Vitest boot the mtav-testing environment; mtav e2e boots its own
mtav-e2e composition (all journeys documented in
tests/Browser/README.md). Each command
installs dependencies, runs, and tears down. Arguments are forwarded to the
underlying runner:
./mtav pest --filter="AdminControllerCrudTest"
./mtav pest --stop-on-failure
./mtav pest --testsuite Stress # opt-in suites: Stress, Browser
./mtav vitest resources/js/tests/unit/composables/useAuth.test.tsKeep the testing environment up and exec into it directly:
./mtav compose testing up -d --wait # once
docker exec mtav-testing-php-1 php artisan test --testsuite Arch,Unit,Feature --filter X
docker exec mtav-testing-assets-1 pnpm run test --run
./mtav compose testing down # when doneThe testing environment runs alongside dev (different ports/project), so you never have to stop your dev session to run tests.
- Tests use the
tests/Fixtures/universe.sqlfixture (seetests/Fixtures/UNIVERSE.md) — loaded once per process, each test wrapped in a rolled-back transaction. - The testing database lives in RAM (tmpfs) and is discarded on teardown.
- Don't run two test invocations concurrently — they share the
mtav-testingcompose project.
Runs core tests scoped to the staged files against the already-running testing environment (docs-only commits are instant; PHP-only commits skip Vitest and vice versa):
- PHP: Arch + Unit suites minus the
slowgroup (~50s) - Vue: full Vitest run (parallel with the PHP run)
If the testing environment is not up, the hook skips with a warning
instead of paying the multi-minute boot cost — so keep it up while
developing (./mtav compose testing up -d --wait). Run mtav precommit
for the fuller check before pushing.
Runs php artisan insights (code quality analysis).
git commit --no-verify -m "Emergency fix" # ⚠️ use only when necessary
git push --no-verifyKeep the InertiaUI packages in sync to avoid runtime issues — update both to the same version:
./mtav composer update inertiaui/modal
./mtav pnpm update @inertiaui/modal-vue