SpinTheMic
Pro

Interview practice question

A test sometimes passes and sometimes fails

Frontend Engineering · Testing and Tooling · Beginner

A test passes most of the time but fails randomly. What are likely causes, and how would you start fixing it?

What a strong answer covers

Your AI report card counts how many of these ideas you cover.

  • Timing/async waits.
  • Shared state between tests.
  • Dependence on dates, random values, order.
  • Real network calls.
  • Reproduce by repeating; fix root cause.
Practise this topic

Start without signing up. Sign in free to get an AI report card on your answer.

See all topics