Ad
  • Custom User Avatar

    I've tried to help you out a bit with tests. I've fixed example test cases tab as it was missing assertEquals, and have done some tweaks to your tests. Have a look in your revisions panel on kata. Have a nice day :)

  • Default User Avatar

    Thanks again. I implemented a custom string generator now. Still nonsenseical words, but it works :)

  • Custom User Avatar

    When enough people have solved your kata and there're no major issues unsolved, the kata can be approved by moderator and it'll be published.

    PS: Your random test cases are now correct :) I would suggest using custom function in order to create random words with letters only, as some people will find it surprising that there're digits when you refer to strings as "words" in your kata description :)

  • Default User Avatar

    Thanks again @gabbek.

    I implemented it correctly now. Do you know how do I get my Kata out of Beta and published? Do people vote on it?

  • Default User Avatar

    Thanks for the help!

    I've changed the example to match the test.

    I've also tentatively implemented a random test, but I'm unsure if I'm doing it right. I've pasted it below. I think asserting the function results equal the function results is bad form. Should I include a master function outside of what the user has provided in the test code?

    var r1 = Test.randomToken();
    var r2 = Test.randomToken();
    var r3 = Test.randomToken();
    Test.it("Random test", function() {
    Test.assertEquals(ppap([r2, r1], [r3, r1]), ppap([r2, r1], [r3, r1]));
    })

  • Custom User Avatar

    The example test lacks Test.assertEquals, there's only ppap(["APPLE", "pen"], ["peN", "pInEapple"]) === "Pen-Pineapple-Apple-Pen"
    It should be, for example: Test.assertEquals(ppap(["APPLE", "pen"], ["peN", "pInEapple"]), "Pen-Pineapple-Apple-Pen");
    Random tests are required so people can't hardcode solutions (check my solution for an example).
    Best regards,
    Gabbek

  • Default User Avatar

    Hi, thanks for commenting! What fixes do you suggest for the example tests?

  • Custom User Avatar

    Random tests required, as well as some fixes to example tests.

  • Custom User Avatar

    your code runs fine.

  • Custom User Avatar

    It allows me to submit fine. Refresh the page, or wait a little while and try again.

  • Default User Avatar

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