Ad
  • Custom User Avatar

    @jsalinasf, I have faced exactly the same thing, and this is the main question - how to fixed something that is not visible. No errors, no timeout, nothing. Just half of tests is correct, another half is not and you can't discover what's wrong

  • Custom User Avatar

    Do you get a timeout? Then you may need to optimize your code. Otherwise I tried to debug my code by printing the table with Rank, Team, For, Against, GD, Points like in the description. Maybe this could be helpful.

  • Custom User Avatar

    You cant debug with console.log() because of large size of data. I can't see neither input data (games), it looks like "... 422534 more items ]", nor output "expected [ Array(978) ] to deeply equal [ Array(978) ]". Any thoughts how to solve this if you even don't know where the problem is hidden? As it was said above, all smaller tests are passed successfully.

  • Custom User Avatar

    What the error message of the failed test? Btw, when 'big' tests are failing, I try to debug the code with console.log() for example. I hope this can help you to investigate the issue in your code.

  • Custom User Avatar

    doesn't seem to be the case, tho.

    @jsalinasf: how much did you loose? if it's one or 2 points, might be a satisfaction vote (after you completed a kata) that has been removed accidentally (sometimes, when you click at the wong place in the page, that can remove your vote). If more, might be worth of reporting on the github repo.

  • Custom User Avatar

    I believe you get more info only as a paying user; being downvoted is the most likely source of negative honour.

  • Custom User Avatar

    build your own tests to screen through all small numbers (like from 0 to 10000) and search for the faulty cases comparing your result with usual arithmetic. Unless you hardcoded somehting (like carryies not handled so that it can propagate on long "distance"), you should spot the edge case not matter what it is.

    Note: I hope you didn't use any conversion string->numbers...? because for big numbers, the conversion in JS will be subject to loss of precision (since even integers are actually floats, in JS...)

  • Custom User Avatar

    The losing honor must have been related to something else (e.g. comment downvoted), as you don't lose honor for postponing a kata.

  • Custom User Avatar

    Pretty sure one does not lose honour for just postponing a kata.