intermediate

Testing

Design test strategy, JS/TS tooling, backend and frontend coverage, and maintainable test quality for production systems.

Testing interviews judge whether you can protect production behavior without drowning the team in slow, flaky feedback. Strong answers connect test layers to risk, diagnosis speed, and maintenance cost—not to coverage percentages alone.

This section covers strategy (pyramid, unit/integration/E2E, contracts, smoke/regression), JS/TS tooling (Vitest, Testing Library, Supertest, MSW, Playwright, Pact), backend and frontend boundaries, and test quality habits (AAA, fixtures, deterministic time, stable selectors).

On interviews: describe how you would test a new feature by naming the failure modes you fear and which layer makes each failure observable fastest.

Common pitfalls: E2E-only suites, mocking everything, snapshot addiction, and tests that break on harmless refactors.

Checklist:

  • Map tests to risk and feedback speed.
  • Keep most checks fast and deterministic.
  • Use integration where boundaries cross.
  • Reserve E2E for critical user journeys.