Nigraan's unit tests, the browser test of key flows, the load and pressure tests, page-speed checks and the translation audit.
Nigraan is checked at five levels, from single functions to the whole system under load.
Vitest with Testing Library, run with npx vitest run in frontend/. The suite has more than 40 test files and more than 600 tests. They cover:
Pure logic is kept out of components (in src/utils/ and src/lib/) precisely so that it can be tested without a browser.
loadtest/e2e-smoke.mjs drives a real Chrome through the website's key flows, 19 steps in all:
It checks in the database that each write landed exactly once. It is designed to run during a load test, to catch what breaks only under pressure.
k6 scripts in loadtest/ replay what one visit to the homepage asks of the backend, and what reporters and reviewers write. They then scale it up through six scenarios: smoke (2 users), baseline (50), peak (300), spike (500 arriving within a minute), soak (100 for 45 minutes), and writes combined with 300 readers.
Each API call is measured separately (requests, failures, p50, p95 and p99 response times), and the pass targets are built into the scripts. In the October 2026 tests on a full copy of the backend, Nigraan handled up to 500 simultaneous users with no failed requests, and response times stayed flat as load grew. These tests run only against a copy of the backend, never the live site.
loadtest/lighthouse.mjs runs Google Lighthouse three times on each public page with a mid-range phone on slow 4G, and keeps the middle result.
npm run i18n:audit: every interface string has an Urdu translation, with consistent terms.npm run type-check and npm run lint: strict TypeScript, and ESLint with no warnings allowed.node scripts/check-rls.mjs: confirms against a real project what a signed-out visitor can and cannot do.