Ad
  • Custom User Avatar

    Thank you for the quick reply!

    The error was coming from the assertion, which is why I posted it as an issue. If it is an error on my part, the assertion IMO does not make this clear. I will check my pathing later but thank you for clarifying some of the errors! Happy Coding!

  • Custom User Avatar

    ... because they are, although I do not remember were I know this from :)

  • Custom User Avatar

    yes I saw that. ;p

    but considdering the stack trace: at /home/codewarrior/index.js:35:36...?

    edit: yep, confirmed, it's the assertion. I just checked against the sampel tests with an empth body. Weird... Means the files are concatenated in JS too...

  • Custom User Avatar

    Test.assertSimilar(getPINs(pin).sort(), expectations[pin].sort(), message )

    Test suite calls sort directly on returned result, so it will crash on undefined falling out of user solution.

  • Custom User Avatar

    @hobovsky: sure it comes from the assertions? looks like it comes from the code of the user, no (but assertions could be at stake, yes)

  • Custom User Avatar

    This happens when your solution returns no value. You probably have some path in your code which exits the function witohut returning anything.

    I agree that assertion could be improved though.

  • Custom User Avatar

    hi,

    not an issue, a question. That comes from your code: at /home/codewarrior/index.js:35:36, so that's just an error in your logic.

    If not already done before, reading stuff in there might help you to debug your code.

    cheers

    PS:

    • issue = dysfunctioning kata, wrong tests or description, ...
    • question = user having troubles to solve

    ;)

  • Custom User Avatar

    TypeError: Cannot read property 'sort' of undefined
    at /home/codewarrior/index.js:35:36
    at /runner/frameworks/javascript/cw-2.js:152:11
    at Promise._execute
    at Promise._resolveFromExecutor
    at new Promise
    at describe
    at /home/codewarrior/index.js:27:5
    at /home/codewarrior/index.js:38:5
    at Object.handleError

    Trying to solve in JS, some tests return okay but others do not.