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.
That's the message set in the tests when the test fails, not the expected output, see it here:
Test.expect( goodVsEvil('1 1 1 1 1 1', '1 1 1 1 1 1 1') === 'Battle Result: Evil eradicates all trace of Good', 'Evil should win' );
With Test.expect, the first argument is a comparison between the output of your function call and the expected output, the second part is the error message if the comparison returned false.
Sometimes the kata creator uses describe, it and Test.assertEquals, that gives more info like:
Expected: some value, instead got: some other value
But that depends on how the kata is written.
Ok, great.
But:
https://imgur.com/uICuVQH - this is still hella confusing.
Original sample tests are also wrong, according to the instructions.
The returned strings are wrong. This is copied from the instructions:
Output:
Return
"Battle Result: Good triumphs over Evil" if good wins,
"Battle Result: Evil eradicates all trace of Good" if evil wins, or
"Battle Result: No victor on this battle field" if it ends in a tie.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Ok, so definitely doesn't work in JS - test cases are bonkers.