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.
kata should make sure not to pass in values like
"loop"
for input (included as a fixed test in JS) because they are not solvable according to the requirement of the kata (make sure the word is different by changing its inner characters), or there should be some extra-specification, or something else.I passed about 20 tests during submission, but then it goes into time out.
I call my function multiple times (while loop) until the word is not the same as the one entered in tests.
Can someone help?
I can not understand where is the mistake.
Thanks in advance.
Needs a javascript tests update (also random tests as written below), it throws warnings
Ruby 3.0 should be enabled.
specifications are incomplete:
"s"
Ruby, python (probably JS, too):
These requirements are not tested strictly/at all:
So
"TEST"
should always return"TSET"
(and never"TEST"
)That would be
None
/nil
in Python/Ruby?That would require a repetitive test with the same string, making sure that you don't always get the same thing. E.g.
"xABCz"
should return all possible combinations after a few tries:"xACBz", "xCABz", "xCBAz"
Javascript version of Kata needs random test cases
Please don't use reserved words as argument names: "string" is a name of a Python module, so please use "s" or something like that instead in Python.
I think there is a nice kata in here somewhere but you need to work out what you want this kata to be about. Either it's about shuffling a set of letters, or replacing the middle characters of words.
Then, you either need to add in a lot more tests for testing the 'shuffledness' of the returned words, or provide a function that the user can use to shuffle the letters, which you can then stub out when testing.
Either way you need more tests.
Some examples with more than one argument would be great. Both description and example tests have only one argument.
And mention what to do when the letters are uppercase. Or mention that words will always be lowercase.
Adding more tests, preferably randomized, would be nice too.
Also, you can equate arrays with
Test.assertSimilar
instead of usingTest.assertEquals
on every element.For other tips on making a better Test Suite, see Tests Best Practices