Last reviewed: 2026-05-25.
SkyWatch Live currently uses TypeScript typechecking, ESLint, Vitest frontend unit tests, production builds, Django system checks, Django tests, Docker image builds in CI, and dependency audits.
npm test
npm run check
npm run test:frontend
npm run backend:test
npm run backend:check
npm run backend:check-deploy| Command | Runs |
|---|---|
npm run check |
Frontend typecheck, lint, unit tests, and production build through frontend/package.json. |
npm run test:frontend |
Frontend Vitest unit tests. |
npm run backend:test |
Django test suite through scripts/backend-manage.mjs. |
npm run backend:check |
Django system checks. |
npm run backend:check-deploy |
Django deployment security checks. |
npm test |
npm run check followed by npm run backend:test. |
npm --prefix frontend run typecheck
npm --prefix frontend run lint
npm --prefix frontend run test
npm --prefix frontend run build
npm --prefix frontend run checknpm --prefix frontend run check is the CI-equivalent frontend command. It runs typechecking, ESLint, Vitest, and a production build. It does not write formatting changes; npm run format runs Prettier when you intentionally want to format frontend files.
npm run backend:check
npm run backend:check-deploy
npm run backend:testRun a specific Django test module or class:
npm run backend:test -- flights.tests
npm run backend:test -- flights.tests.FlightViewTestsCheck migration drift:
cd backend
python manage.py makemigrations --check --dry-run
python manage.py migrate --checkCoverage tooling is not part of the default dependency set. To measure backend coverage locally:
cd backend
python -m pip install coverage
coverage run --source='.' manage.py test
coverage report
coverage htmlFrontend unit tests use Vitest and live next to the code they cover as *.test.ts or *.test.tsx files.
.github/workflows/ci.yml runs on pushes and pull requests:
- Frontend: Node 22,
npm ci,npm run check. - Backend: Python 3.11, PostgreSQL 16, Redis 7, install requirements,
python manage.py check --deploy, migration drift check, Django tests, andcollectstatic. - Docker: build backend and frontend Dockerfiles.
- Security:
npm audit --audit-level=highandpip-audit.
.github/workflows/staging.yml is manually triggered with workflow_dispatch and runs a staging smoke path with demo mode.
Backend tests live in backend/flights/tests.py. Add Django test cases there or split into additional modules when the suite grows.
Example:
from django.test import TestCase
from flights.models import Aircraft
class AircraftTests(TestCase):
def test_aircraft_creation(self):
aircraft = Aircraft.objects.create(icao24="abc123", callsign="TEST123")
self.assertEqual(aircraft.icao24, "abc123")Frontend tests should prefer small pure helpers and behavior that does not require a browser. Use *.test.ts for pure utilities and *.test.tsx for React tests when component test utilities are added.
Backend debugger:
cd backend
python manage.py test --pdb --failfastVerbose backend tests:
npm run backend:test -- --verbosity=2Inspect SQL with Django's built-in shell and query logging rather than shell_plus, which is not part of the current requirements:
cd backend
python manage.py shellImport errors:
cd backend
python -m pip install -r requirements.txt
python manage.py testTest database issues:
npm run backend:migrate
npm run backend:testFrontend dependency issues:
npm --prefix frontend ci
npm run check-
npm run checkpasses. -
npm run test:frontendpasses when frontend behavior changes. -
npm run backend:checkpasses. -
npm run backend:check-deployis reviewed with production-like env values when deployment behavior changes. -
npm run backend:testpasses. - Migration drift check passes after model changes.
- Documentation is updated for user-facing behavior changes.