← Problems
export function formatPrice(value) {
  return "$" + value.toFixed(2);
}

// TODO: customers report the total looks too low.
export function cartTotal(items) {
  return items.reduce((sum, item) => sum + item.price, 0);
}

PreviewOpen in new tab ↗Tests

Tests only run when you press ▶ Run tests (next to the Tests heading). Run them again after each change.

Open browser consoleTests

/src/utils/cart.jsJS