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.
you need to use 'submit' button because there are no example teat cases
I can't see the error message.
I think you should copy these five testcase to the example testcase block.
and, should add some random test in the testcase block
@myjinxin2015: Please use proper formatting for code, e.g.
will result in
For more information, search for "GitHub flavored markdown".
You probably want to read the codex.
example for random test:
function answer(word){
//your code...
}
function randomword(){
//your code...
}
for (var i=0;i<100;i++){
var testword=randomword(), myanswer=answer(testword);
Test.assertSimilar(longestWord(testword), myanswer,'should return '+myanswer);
}
like this:
Test.assertSimilar(longestWord("The quick brown fox jumped over the lazy dog"), 6,'should return 6');
Test.assertSimilar(longestWord("1231231231231232131231231 ?!?!?!?!!?!? The quick brown fox jumped over the lazy dog"), 6,'should return 6');