Projects: Cash Register - last test doesn't make sense to me

Projects: Cash Register - last test doesn't make sense to me
0

#1
checkCashRegister(19.5, 20, [["PENNY", 0.5], ["NICKEL", 0], ["DIME", 0], ["QUARTER", 0], ["ONE", 0], ["FIVE", 0], ["TEN", 0], ["TWENTY", 0], ["ONE HUNDRED", 0]]) should return {status: "CLOSED", change: [["PENNY", 0.5], ["NICKEL", 0], ["DIME", 0], ["QUARTER", 0], ["ONE", 0], ["FIVE", 0], ["TEN", 0], ["TWENTY", 0], ["ONE HUNDRED", 0]]}

I’m having trouble understanding this last test. Shouldn’t it only return

 {status: "CLOSED", 
  change: [["PENNY", 0.5]]} 
  • The last test is the only one where change is not sorted highest to lowest (unless I’m mistaken, instructions say to sort highest to lowest)

  • The only one showing coins/bills that are at $0


#2

Yes the last test is a special case of what to do if the change needed is exactly what is found in the cash register. So just follow the given test case to see how to structure the response.