Add Tests to an Untested Module with AI

Medium · AI-Assisted Coding · about 45 minutes

Asked at Meta, Shopify.

You're given a small module (a pricing calculator with discounts, rounding and currency handling) that has no tests, plus an AI assistant. Write a test suite that would catch regressions and real bugs. Afterward, the interviewer will plant a bug and see whether your tests catch it.

Related guides