Ad
  • Default User Avatar

    I think cause when I was writing it, my mindset was on expected should always = output of the method.
    which is why I was surprised to see Expected = the original input cause my mind was like
    "But the whole point of the method is to remove the smallest number!" that's why

  • Default User Avatar

    Current test message:
    You've mutated input array

    Wonder if this will be clearer?
    You've mutated input array (expectation assertion is on value of input array, not output of method)

  • Default User Avatar

    Maybe the test expectation message can be more accurate? I thought the expectation was the output of the method, which was what confused me.

  • Default User Avatar

    ahh right thanks - i took that to mean don't mutate the order

  • Default User Avatar

    Sorry should have been clearer - this is with the mutations to original array test

  • Default User Avatar
    > check for mutations to original array
    Log
    Direct input is [147, 376, 340, 233, 281, 322, 132, 128]
    
    You've mutated input array -  
    Expected: [147, 376, 340, 233, 281, 322, 132, 128], 
    instead got: [147, 376, 340, 233, 281, 322, 132]
    

    What I don't understand is: If the direct input is [147, 376, 340, 233, 281, 322, 132, 128], I would expect the smallest number '128' to be removed - but it seems the expectation does not expect this

  • Default User Avatar

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

  • Default User Avatar

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