Write a Unit Test

Talk it through with a coach who asks guiding questions and gives hints until you reach the answer. Pass to mark the challenge as completed.

The problem

  • easy
  • Pro

You need tests for a function that formats an amount of pence as a price in pounds. Explain how you'd structure a good unit test, which cases you'd cover, and how you'd name the tests.

Talk this problem through with an AI coach

This is a Pro challenge. Sign in with Google, then upgrade to start a voice session.

Start free →