Ad
  • Custom User Avatar

    I see some wrong answers (checking only for SUMS), I guess the tests doesn't cover an example with duplicates but the same sum?

  • Custom User Avatar

    I would replace the -1 result with a null/undefined/false, -1 index it's a Java relic limitation that should not exists in the first place. It is more confusing in JS because you can do string.slice(-1).

    Nice one really, all the basic algorithms should have at least 1 kata around here.

  • Custom User Avatar

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

  • Custom User Avatar

    Do you mean DIGITS not numbers, please update the description because the results are very different.

  • Custom User Avatar

    Why ppl think english is the only language in the universe? Nice kata but the "th, st..." shouldn't exists in the algorithm, just my 2nd cent.

  • Custom User Avatar

    This are the input and output of one of the failing tests

    player1 [ [ 6, 7 ], [ 7, 3 ], [ 3, 7 ], [ 6, 6 ], [ 6, 4 ] ]
    vs
    player 2 [ [ 6, 4 ],[ 3, 3 ], [ 9, 3 ],[ 7, 1 ],[ 6, 7 ],[ 2, 2 ],[ 4, 2 ],[ 3, 9 ],[ 10, 4 ],[ 8, 4 ] ]
    
    Result!!
    player 1 [ [ 6, 7 ] ]
    vs
    player 2 [ [ 6, 7 ], [ 2, 2 ], [ 4, 2 ], [ 3, 9 ], [ 10, 4 ], [ 8, 4 ] ]```
    
    Is correct right?
    
  • Custom User Avatar

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

  • Custom User Avatar

    I think an input has a misspell in the unit tests (2100k instead of 2100).

    Description:
    filter2('2100') == '2KB';

    TestCases:
    Test.assertEquals(filter2('2100k'), '2100k');

    Error:
    Expected: 2100k, instead got: 2KB

  • Custom User Avatar

    Anyway you do not understand the principle, the message "Input argument must be a string" is wrong, the description of a test should be what you compare in the test (result should have been x, but is y given z as input). That message is related with the implementation and scenario, is not communicating nothing usefull to the programmer.
    This is how should be:

    • Basic tests
    • Expected: 234k, instead got: undefined
    • Expected: 98m, instead got: undefined
    • Test Passed: Value ==

    Instead this kata returns

    • CategoryName
    • Error=categoryname
  • Custom User Avatar

    Message is wrong, 19 tests passes, inclusive all the tests from category "Incorrect string type".
    The error is from the 3rd test from category "Asserting equals:".

  • Custom User Avatar

    I think something is wrong in a description of a random JS test, I keep getting TypeError: Cannot read property '0' of undefined at battleTest at Object.Test.describe Can you check it out please?

  • Custom User Avatar

    Overall the kata answer is not solving the problem, is to assert the input, I do not like it. Though I want to finish it.
    Unit test messages should state what input was given and what should be the answer, otherwise is guessing from my side.
    I still have the error "Input argument must be a string" at the last test (in JS) though I have "typeof==string", so it is a string, the message is wrong.

  • Custom User Avatar

    I think the JS error messages are confusing, "Input argument is a string." what does it mean? What was the input, what was the expected output?
    It has errors or has wrong test cases messages.

  • Custom User Avatar

    I think the random tests are not realistic, a country cannot win more then (byte) medals in a single olympic event. I think there are 300 maximum if they win all of them?