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.
Lua translation!
random tests could be improved for solutions like this
This comment is hidden because it contains spoiler information about the solution
What do we need to return in cases like this exactly? -> The method has not thrown any exception (input : 80)
I don't understand what kind of answer is expected in this case... The format of string in particular. it just says:'should raise an exception'. But doesn't take such an answer in string, in cases where it's actually an exception?
Duplicate.
CoffeeScript shouldn't use Test.expect.
There's no real explanation as to what the expected string format is.
We should use
assertEquals
. Old things should not stay old.This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Interesting kata! A couple things -- the tests should check that the user is actually defining a generator function. You can do something like
Object.getPrototypeOf(flatten).constructor.name === 'GeneratorFunction'
to test this. Also, the test expects the generator to yield values in a specific order, butroutes
is an object, and JavaScript objects are unordered, so you should either not require any particular order, or explicitly define the order in which the generator should yield values.This comment is hidden because it contains spoiler information about the solution
Just translated it into Ruby and Python, if you wish to implement those two languages too :)