Ad
  • Default User Avatar

    The JavaScript version of this Kata has no sample tests. (I am assuming the random tests are fine but only because I didn't run into problems with them.) I received the message below when I tried to run the sample tests.

    Test Results:
    Solution
    should test for something
    This is just an example of how you can write your own TDD tests - Expected: 'expected', instead got: 'actual'

  • Default User Avatar

    Since I can't see all the test cases, I'm making this suggestion based on the other functions that this kata accepted as correct solutions (i.e., I know I might be mistaken): The test cases should include numbers that have more than one digit. A few/some of the currently accepted functions would fail this kata if they had to sort multi-digit numbers.

  • Default User Avatar

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

  • Default User Avatar

    I think the description/instructions to this Kata should emphasize that all the coder needs to return is a number value (i.e., the number of sheep). I think most of the people who attempted this Kata were paying more attention to the sample test, especially the line that reads:

    Test.expect(countSheeps(array1) == 17, "There are 17 sheeps in total")

    If they were like me, they were trying to create a function that returns a string/message and were getting the error messages:

    There are 17 sheeps in total, not There are 17 sheeps in total
    There are 500 sheeps in total, not There are 500 sheeps in total
    There are no sheeps at all, you counted There are no sheeps at all

    -which is massively confusing.