Ad
  • Custom User Avatar

    Yes, the random tests are vulnerable to input modification. No, if you do not modify the input the tests are not wrong. Yes, if you modify the input you deserve whatever you get.

    Note that [].sort modifies its input.

    Not a kata issue. Closing.

  • Custom User Avatar

    Same error without modifying the input in JS :

    [ 19, 72, 16, 50, 25, 92, 80, 23, 40, 63, 26, 99, 42, 18, 68, 3, 75, 96 ]

    Expected: '[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18]', instead got: '[15, 6, 17, 9, 13, 3, 4, 14, 11, 8, 12, 1, 10, 16, 7, 18, 5, 2]'

  • Custom User Avatar

    What language is failing? I'll look into why it is doing so now.

  • Default User Avatar

    do you mutate the input?

  • Default User Avatar

    What language are you using? I just realized there are not 900 tests in python (just some...). Unfortunately, I won't be capable of helping you in PHP or JS, sorry.

  • Default User Avatar

    I'd bet that if you fail some tests, with inputs as big as they are, the assertion message will cause the very same problem than if you were actually printing something to the console yourself.