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.
Try the TDD approach:
Added sample tests
This comment is hidden because it contains spoiler information about the solution
No worries. I just look to see if all the code in that box is greyed out. If so, there's no actual test cases. You can still put in your own, though; that's kind of the intended use.
Ah, I see now. I guess I'm just used to Katas having built-in test cases. Thanks.
There aren't any tests I've put into the "your test cases" section, so nothing will run there unless you put your own tests in there. Maybe there was just an issue with your tests?
Very weird, the "run tests" button didn't work. But the "submit" button works fine.
Seems to run fine and pass everything for me. What do you mean by the "original test"?
This comment is hidden because it contains spoiler information about the solution
It seems your code modifies the inputed array (
array
) :Your code works fine on
repl.it
because you test only 1 rotation (rotate(data, 2)
), add another rotation before yours . . . :Hope it helps! ;))
I'm getting this error:
Expected: [4,5,1,2,3], instead got: [2,1,5,4,3]
I have no idea why, everything works correctly from what I can tell. This is my code: https://repl.it/CYOf
When running my tests for JS I got
Solution
should test for something
Expected: expected, instead got: actual
But it worked fine when I submitted it.