Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
yea I assumed it was me, I'm new to this, thanks for the help.
Add this line in your code will kill the -0
It's problem about your code, not the kata, isn't it? ;-)
I'm getting exactly the same problem. I tried other passed solutions and now they don't pass because of [-3,-0]
But why we got -0? It's not in the list.
I'm getting the same error in my tests. I wonder why this is happening when
-0 === 0
returns true in javascript.and when I try it in repl it works fine... hmm.
This is odd, for this test:
Test.assertSimilar(findAB([-3,-2,-2,-1,0,1,2,3,4],0), [-3,0]);
i get:
Expected: '[-3, 0]', instead got: '[-3, -0]'
how on earth is it coming up with a negative 0... what am I missing?
I really enjoyed this kata! I will say reading about some people's problems ahead of time let me preplan for edge cases
It would be helpful if you could see what the test cases are so I can actually fix my code instead of guessing at the problem.
thanks!
The tests are already inbuilt with the Kata. The tests you are looking at are the TDD example tests where you can make your own test cases and play around with different tests. You do not have to pass all these tests to complete and submit your solution - you only have to pass the "submit" buttons tests. Also, when you start a Kata with no example tests it should give a framework of how to write the tests.
If you want to write your own tests or learn how to test if you're making a Kata, have a read of the Kata Test Framework which lists how to test for each language. This is not an issue so would you mind resolving the issue by replying and ticking "resolved". Cheers.
Can anyone provide some guidance on writing test cases? I have the code finished but I can't figure out the writing of the test cases. I wish it just came with them!
Is it possible to see the test arrays its running against because in my tests it works but on here it doesn't.