Ad
  • Default User Avatar

    if the string contains 2 spaces this code will return 1

  • Default User Avatar

    function wordCount(str) { return (str.split(" ")).length; }

  • Default User Avatar

    I think that the tests are not strict enough, I think my answer is not supposed to pass, since it is not symmetrical

    Anyway, great Kata ! I'm still trying to find a better answer !

  • Default User Avatar

    Awesome! The custom matcher is working well.

  • Custom User Avatar

    Done! The test cases now rely on a custom assertSimilarUnsorted matcher :)

  • Custom User Avatar

    Glad you like it :)
    Good call fir the order, however I'm stuck because there is no Test matcher that would do the job, I will try to add another prototype method to Test.

  • Default User Avatar

    I like this kata so far. My only question is whether the order of the solution array should matter. I'm getting the following error message:

    Test Failed: Expected: [["tsar","star","tars"],["rat","tar"],["cheese"]], instead got: [["rat","tar"],["tsar","star","tars"],["cheese"]]

    The groupings seem to be correct, but should I be penalized for having them in a different order?

  • Custom User Avatar

    You sugguest more test cases in the Kata description ?
    Or in the solution test cases ?

  • Default User Avatar

    Maybe provide more test cases.
    Is tagging already done ?

  • Default User Avatar

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