Ad
  • Custom User Avatar
  • Custom User Avatar

    this solution does not cover the following scenario: [0,2,27,-60,57,99,-28,28,-15,7,-16,-63,32,82,-64,-57] expected: [0,2,-60,28]

  • Custom User Avatar

    check function.name

  • Custom User Avatar

    I get these erros:
    first handler calls - Expected: 1, instead got: undefined

    first handler arguments - Expected: '[1, 2, 3, 'first', undefined, false]', instead got: 'undefined'
    I can't understand it because when I log the handler function it shows that its args property has the correct values inside an array and its call property is 1.

  • Custom User Avatar

    Well, you should raise a question instead in this case. Otherwise we're confused too ;-)

  • Custom User Avatar

    Hi,

    I didn't mean to imply that there was something wrong with the kata. I was just confused by the random tests. Thanks for the tip about printing the input to the console.

  • Default User Avatar

    Hi,

    First, this is not an issue, this is a question. "Obviously", since 97 people already completed the kata in JS, it's a problem in your code, not in the kata (issues are for the latter case).

    About your question, so: yes, there are random tests that your code has to pass. That means your code doesn't handle properly some edge case that appears in the random tests only. You should print the input to the console to debug your code.

  • Custom User Avatar

    Okay, this is strange. I am getting a type error for an undefined object property but each time I run the attempt I pass a different number tests, even without changing the code. Doesn't it always run the same tests? How can I be passing 20 tests in some runs and 0 in others with the same code?

    I also can't debug the type-erros since I am not being shown the input that produces it. It passes all the sample tests plus more sample inputs I came up with. I can't see why it would produce the type error.

    Any suggestions?

  • Default User Avatar

    Not an issue

  • Custom User Avatar

    Do I sense some sarcasm?

  • Custom User Avatar

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