Ad
  • Custom User Avatar

    Why the unused, confusing functionality ( delimeter ) in the example solution?

    This is a 7 kyu kata; beginners might look up your solution to see how it should canonically be done, it should be as clean, simple and efficient as you can make it.

  • Custom User Avatar

    99 more random tests wouldn't hurt.

    Using the same input for six assertions at a time would mean you only need two reference solutions ( generate a string, calculate the corresponding array and set, use those values as inputs and expected outputs ).

    The it-headers of the random tests could show values in a nicer way. Use JSON.stringify for strings and arrays, and maybe mock up something custom to replicate the output of console.log(set)?

    Use strictEqual for strings.

    args is just a wrapper for Array.from. Also, it's just unnecessary if you pass a single string instead of a list of chars.

  • Custom User Avatar

    If the optional header is missing, is it considered valid?

  • Custom User Avatar

    Actual tests contain some weird, undocumented required behaviours such as pullAll(array, values), which is not required in any fixed tests. The current fixed/sample test cases are definitely not enough in showing the full required specs.

  • Default User Avatar

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

  • Custom User Avatar

    You should factor out the random generation and the reference solution from the random tests. This is not maintainable.

  • Custom User Avatar

    When taking inspiration from other kata, make sure it's not just an inverted duplicate. This is. Incomplete specs do not make this not a duplicate of the other kata. The idea is just no longer novel.

  • Custom User Avatar

    Needs puzzle tag.

    If this is unintentional, the specifications are incomplete.

    ( I do not agree with your specs anyway. Non-numbers can't be odd. )

  • Custom User Avatar

    If strings are to be coerced to numbers, not expecting booleans to be coerced to numbers is inconsistent.

  • Custom User Avatar

    The messages in the Set tests are wrong:

    For input [["i","i","i","i","i","i","i","i","i","i","i","i","i","i","i","i","i","i","i","i","i","i","i","i","i","i","i","i","i","i","i","i","i","i","i","i","i","i","i","i","i","i","i","i","i","i","i","i","i","i","i","i","i","i","i","i","i","i","i","i","i","i","i","i","i","i","i","i","i","i","i","i","i","i","i","i","i","i","i","i","i","i","i","i","i","i","i","i","i","i","i","i","i","i","i","i","i","i","i","i"]]: expected +0 to equal 1