Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
There are no flawed random tests in javascript, you're either reading the logs wrong or didn't understand something.
Read this: https://docs.codewars.com/training/troubleshooting/
I spent a lot of time testing and refactoring my code because I kept getting failed tests. I realized that some of the random tests are flawed. There were two random tests that had the same exact customers, but expected different results (wtf?).
I would check if the incoming customer's change amount would exceed the amount in the register. If it did exceed, I would break out of the loop and immediately return "NO". Why would I need to continue looping through every customer if at least one cannot receive change?