Real World Example

How Product Teams Run Tests

Teams at companies like Razorpay or Zerodha run fast checks on every pull request and the slower E2E suite before deploy. A typical ShopEase setup:

WhenRunsTime
On save (local)Vitest watch mode for changed filesms
Every PRtsc --noEmit, ESLint, Vitest, next build2–4 min
Before deployPlaywright smoke tests against a preview URL3–6 min
NightlyFull Playwright suite on 3 browsers + mobile viewport15 min

package.json Scripts

{
  "scripts": {
    "dev": "next dev --turbopack",
    "build": "next build",
    "start": "next start",
    "lint": "eslint",
    "typecheck": "tsc --noEmit",
    "test": "vitest run",
    "test:watch": "vitest",
    "e2e": "playwright test"
  }
}