In JS (at least), we may receive a string with spaces at the beginning. It doesn't match with the description : You will be given a string with sets of characters, (i.e. words), seperated by between one and three spaces (inclusive).
the description and/or the tests are incorrect: from the description angles are in radians while in the sample tests they seem to be in degrees.
the requirement about rounding is pretty weird and isn't applied correctly: the condition should be checked with abs(x-y) < 0.001, but this leads to several problems:
unless you specify exactly what you want, the user is reduced to poke randomly in the dark to find what you exactly did
someone choosing a different approach might not pass the kata while having a correct solution, because of rounding troubles (becomes critical once random tests are implemented)
In the end, this is the typical kind of idea that doesn't translate well into a kata... ;)
JS "Random number of spaces" test has words separated by 4 spaces:
In JS (at least), we may receive a string with spaces at the beginning. It doesn't match with the description :
You will be given a string with sets of characters, (i.e. words), seperated by between one and three spaces (inclusive).
Failing tests ought to display what the input was
it/describe ought to be called as decorators
(also, the test case generator code is repeated 4 times but whatever I guess)
Hi,
angles are in radians
while in the sample tests they seem to be in degrees.abs(x-y) < 0.001
, but this leads to several problems:In the end, this is the typical kind of idea that doesn't translate well into a kata... ;)
cheers