Skip to content

Search is only available in production builds. Try building and previewing the site to test it out locally.

Testing

The Unsexy Stack ships with 200 tests — 145 backend (pytest) and 55 frontend (Vitest) — at 98% backend coverage. These are the counts in the shipped download, published in full, not cherry-picked screenshots.

Many boilerplates test against SQLite for speed, which silently hides transaction-lifecycle and constraint bugs that only appear on a real database. The backend suite includes an integration lane that runs against real PostgreSQL, so the race-safe provisioning and webhook idempotency tests exercise the same engine you ship on.

The hard parts are each backed by a test in the download:

  • Race-safe provisioning — two concurrent first-logins both miss the row, both insert; the loser catches the IntegrityError and re-fetches. test_deps_get_db_user.py asserts no duplicate user.
  • JWKS cachetest_auth_cache.py asserts the cache serves from memory within the TTL and refetches after expiry.
  • Webhook replaytest_edge_cases.py posts a re-delivered Stripe event_id and asserts already_processed, never a double-charge.
Terminal window
make test # backend + frontend, with coverage
cd backend && pytest --collect-only -q | tail -1 # confirm the count yourself

The point of publishing the counts and the integration lane is simple: you can verify the quality before you build on it.