Ad
  • Default User Avatar

    Hi Smile67, I know, I had to change the name because I had a typo the first go around (it started with a capital letter) and I had to fix it. Unfortunately, that would have broken previously correct solutions. Oh well, it is still in beta. Thank you for being so helpful with the test cases!

  • Default User Avatar

    Thank you, smile67, for your good advice! Done!

  • Default User Avatar

    Hi, Thank you for your comment. The kata has 2 example test cases and then there are the extra test cases. What do you mean by random tests?

  • Default User Avatar

    Hi walraz,
    Please see above for my explanation on how to use console.log(); hopefully, that will be helpful to you :) And when you do your final submit you can clear the console.log(this) line out of your code block (as it is only for seeing what the inputs are).

  • Default User Avatar

    Hi walraz,
    I found out that you can console.log(the input) within the code block to have the inputs from the extended, and hidden, test cases printed with the output. For this particular kata I used this as my code block: console.log(this); return /regex/.test(this);
    Good luck!

  • Default User Avatar

    Out of the 106 final tests, my solution is passing 105 and failing 1! How do I use console.log() to find out what input/argument is being used in the one test that is failing?

  • Default User Avatar

    Hi Giacomo,

    I would be very happy to message you, but, literally, I don't know how to use the address you've given. I tried using it in an email (To:) and that did not work. Help?

  • Default User Avatar

    Thank you for your help Balkoth and GiacomoSorbi!

    Giacomo: I've sorted the additional basic tests (yay!) and looked at your random test cases for the ruby version. I definitely need help in building random test cases for the JS version. If you would like to tell me how to write the random test cases for JS version (and maybe explain the hows and whys of it), I would really appreciate that :) Your given address is very interesting, and slightly intimidating, and gmail does not like it; I'm not sure how to use it.

  • Default User Avatar

    Hi Giacomo,

    Thank you for the good advice to avoid zero! I think I'll add to the description: The arguments should de non-zero positive numbers, else return false. And then edit solution and tests. But before doing that I thought I should build out the tests for what is there currently--and just working on basic tests has thrown an error. I've copied basic tests from your Ruby version:
    Test.assertEquals(getSize(4, 2, 6), [88, 48]);
    Test.assertEquals(getSize(1, 1, 1), [6, 1]);
    Test.assertEquals(getSize(1, 2, 1), [10, 2]);
    etc.
    However, when I attempt to validate, I get an error: Expected: [88,48], instead got: [88,48]
    I assume it's my syntax (and I've tried lots of 'fixes' to no avail). Since you are being so helpful, could I ask for your advice?

    Kara

  • Default User Avatar

    Hi Giacomo,

    Thank you! This is actually my first kata, so I am aware that it is a bit shaky. I would like to edit the kata so that it returns non-numbers and negatives as false. And then write test cases for that. I will definately look at how you have set your random test cases.

    Your encouragement (and any advice you have) is definately appreciated!

    Kara