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.
Same issue.
Random Tests
[ 4577, 956, 1226, 8884 ]
Expected: true, instead got: false
Everything seems good now. The requirements are clear, and the error messages are helpful. Great kata!
It follows the rule set. Make sure the entered code exactly matches the correct code (including the data type). You're most likely one character away from solving this kata.
This comment is hidden because it contains spoiler information about the solution
Everything worked as expected. Nice kata!
If you post a link, I'll be happy to take a look at it.
I finally discovered the problem. After I solved it, looking at the other solutions made me see there was a much simpler way. Thanks for checking!
It will seem that way! Some of the tests have tickets that are just pretending to be newly created. Once a ticket has been used, remember to block it from being changed manually. The point of this is to prevent a situation where hackers would try to take a used ticket and manually change ticket.used from true to false so they can reuse the same ticket. I hope this helps!
This has been immensely helpful. I've updated my test cases to use Test.sample, so now my tests are much more robust while the code for those tests is much cleaner. I really appreciate this, and I'm glad you like the kata! As before, if there's anything else I've missed, I welcome the feedback.
I'll add some more random expected return values when I have time. Thanks again.
I'm glad to hear it!
That sort of thing happens to me a lot too. In case anyone else runs into the same problem, your comment will probably help them.
Thanks for the feedback. The thing I'm concerned about is making it too easy by saying exactly what's wrong. The user can always just do a console.log on the input and see exactly what the target email address is. That should provide more than enough guidance unless the description missed something. Thoughts?
Hopefully it should all be fixed now. Thanks again for alerting me to the issues, and if anything else needs to be clarified or changed, I'll be happy to do so.
Good points. Looking back, the only part I randomized was whether or not the codes matched. I'll fix that. I'll also update the description to clarify whether the ticket.code and ticket.used need to be publicly accessible. Thanks for the feedback.
Loading more items...