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.
Each of these three parts is only allowed to be 20 less or 20 more or somewhere in between (in decimal).
should be reworded tothe difference between each three color parts of the pairing should be less than or equal to 20
Does not mention the format of color code (whether lowercase characters are allowed)
In 3rd requirement:
[['#271285', '#232189'], ['#AA728B', '#BB7281']] is a valid ...
should be[['#232189', '#271285'], ['#AA728B', '#BB7281']]
in accordance with the previous rule on smaller hexadecimal number preceding bigger ones4th requirement && 2nd example:
can not
-->cannot
2nd requirement:
The firs color
-->The first color
The description states: The array of pairs must be in ascending order ... In the case of two pairs with the same first color, the 2nd color must be in ascending order.
There are some tested pairs with identical red and green parts and different blue parts. These need to be sorted ascendingly based on blue to pass the tests.
While this is easy to infer, I suggest changing the description
I can't recommend extending prototypes in tests. See the tests of the fork of my solution how to make it selfcontained.
I have already fixed
colour0!==colour1
in the tests, but you can put this in yourself.About
colour 0 !== 1
: if duplicate colours use different casing in the input, it won't be recognised. That doesn't happen with tests as they are ( everything is generated in uppercase ), but there's still ever more devil in details ..If and when the tests are OK, consider putting in some
describe
andit
-headers, and updating the kata toNode 10.x
.( Do focus on getting actual content actually OK though. )
The random tests are not random (see this). Regards, suic
Example test #5 has incorrect expected value. This may seem small; it isn't.
No random tests. Did you read the documentation on creating your first kata?