Bug in CashRegister challenge test

In test case checkCashRegister(19.5, 20, [["PENNY", 0.01], ["NICKEL", 0], ["DIME", 0], ["QUARTER", 0], ["ONE", 1], ["FIVE", 0], ["TEN", 0], ["TWENTY", 0], ["ONE HUNDRED", 0]])

the balance due is 20 - 19.5 = 0.5, According to the second argument we have 1.01 in the drawer,
the output should be

  status: "OPEN",
  change: [["QUARTER", 0.5], ["PENNY", 0.01]]


  change: []

challenge link

You can’t give quarters in change if there are no quarters in the drawer. If you have one dollar and one penny in your drawer, it is impossible to make 50 cents of correct change.

1 Like

@ArielLeslie, thank you so much, I’ve been stuck on this for so long

It’s one of those things that sound so obvious you start to wonder how you missed that.

Thanks to you I’ve completed the challenge