Ad
  • Custom User Avatar

    Yes it's right your solution passes without new lines, and now I've changed that. But have you tried console.logging your string? It does not look like a chessboard. That's why it fails the 8x3 check.

  • Custom User Avatar

    It's fixed. Sorry about that.Thanks for having a look.

  • Custom User Avatar

    Sorry about that.

  • Custom User Avatar

    I checked before making the fix, I thought you said that the harcoded 11s were a special case and the problem was persistant after Damjan fix;
    About the thanks, no, I thank you for the time you spent. (it was a lot)
    Now I am a bit scared about writing a new kata. Anyway maybe I learned some lessons :)

  • Custom User Avatar

    No. Thank you!

  • Custom User Avatar

    With these two lines hardcoded everything seems fine, with Damjan fix :)

      let randMonth = 11;
      let randDate = 11;
    
  • Custom User Avatar

    I've put the tests in the Example tests box, too because I noticed a very strange behaviour. The tests seem to be right, however my solution does not pass the tests from time to time, however when I manually try the random input from the tests in the console the solution passes as correct! I'm staring at the monitor. Please try validating your solution many times see if you can reproduce this behaviour. I dunno what's the issue. I've logged the random numbers in the error message in assertEquals so we can see them..

  • Custom User Avatar

    yeah i saw it when i tested:) and forgot to fix it in the comment; now it's fixed

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    Well, I've never written some good tests in my life...Please be gentle. Also this kata allows contributors.
    I'll do my best. I'll extend Sergiu's example.

  • Custom User Avatar

    I changed the Test cases there are more now and I'd say they are unpredictable.

  • Custom User Avatar

    The point was to actually write a regex :)

  • Custom User Avatar

    Accepted!

  • Custom User Avatar

    True. Due to copy paste. Fixed it. Thanks!

  • Custom User Avatar

    I hope I fixed that. This is my first kata. I am asking for some advice. What rank do you think this kata would be? 7kyu? :)
    Also I suuuper appreciate the feedback.