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.
"increasing" and "decreasing" should be specified better. ATM, testing is so limited it allows for solving with a third category "constant" - this may or may not even be intentional.
Needs random test cases, refer to this for examples :)
Needs random test cases
Similar to the "Overlapping Ranges" kata, please use the
Test.assertEquals
method. This at least makes it easy to see what the error was.Another suggestion is I highly recommend wrapping your tests in
describe
andit
blocks (in both Katas). This enables more than one test to run before bailing.BTW: bkaes has put together an amazing document about writing good Katas. Definitely worth a read!
Also, I believe the answer for this test is off-by-one. It states the index should be
3
, but at the index3
we're still increasing:It is a matter of opinion as to where the result should be, but it really seems like the first number that changes the pattern is at index
4
.Your description of the problem doesn't match the expected solution or code setup (it says you'll receive an array, but 5 unique arguments are passed in).
There's also no example test cases, which doesn't help.