Ad
  • Default User Avatar

    Hi alanolmo

    @Voile is correct about the internal implementation. The Array is too large to print out - Expected: 'true', instead got: 'false' just means that your solution is incorrect for that test case and unfortunately due to the large arrays, I can't print out the test array so that you can see what values were used in that test. It has nothing to do with whether you are printing out anything or not.

  • Custom User Avatar

    Internal solution runs for around 6 seconds, so your aim is to be at least as fast as it.

    If your answer is correct, you get true, otherwise you get false.

  • Default User Avatar

    I have added some text to the it block. Thanks for bringing this to my attention, I had no idea about this issue.

  • Custom User Avatar

    I don't know, it's a well-known issue of CW's JS test framework. So the common suggestion is to at least put something non-empty as the descrption string.

  • Default User Avatar

    Hi Voile

    Why would an empty string make any difference as opposed to some text message for that test block when it comes to eating the outputs?

  • Custom User Avatar

    That's because the random tests has this:

    it('', function() {
    /*...*/
    

    Putting an empty string in Test blocks is a bad bad bad idea, because it eats all the console.log outputs.

  • Default User Avatar

    I'm getting the same thing.

    I copy & pasted my solution out to a html file to test it in Firefox (which I end up doing a lot when I'm stuck). Turns out I can break my solution by feeding it really long arrays (9k+) which some of the other commenters here mentioned were in the random tests, I get too much recursion.

    Well, so much for that idea. :/