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.
.
Language?
Description seems to be already fixed
The description is clearer now, and I added the edge case where
n==m
to the description, examples, and tests for both languages.It looks like someone already edited the Javascript tests to use
assertEquals
. CoffeeScript's==
operator compares for strict equality (equivalent to===
in Javascript) so I think it's okay left as it is; someone else can edit the CoffeeScript tests if they think it's still an issue.This comment is hidden because it contains spoiler information about the solution
Yes I got this as well, although you may have solved it by now.
This means that your validation scheme is letting through a bad input.
Try console debugging to find what the bad value is.
Should implement some random tests. I am seeing hard-coded arrays in the solutions here.
I believe I've fixed this issue, if you could please check and then mark this issue as resolved, thanks! :)
ಠ_ಠ
Description shows incorrect parameter usage:
arr2bin(1,2,'a') == false
should be:
arr2bin([1,2,'a']) === false
The description should also specify the return value of an emtpy array should be
'0'
. Currently it says all non-numeric values should returnfalse
, which should includeundefined
, but the tests require otherwise...Try this out, new example test cases here:
Test.describe("Fixed Tests (new)", _ => { Test.it("Tests", __ => { Test.assertEquals(wordSearch("desert",myText),true); Test.assertEquals(wordSearch("blue",myText),false); Test.assertEquals(wordSearch("well",myText),true); Test.assertEquals(wordSearch("house",myText),false); Test.assertEquals(wordSearch("beautiful",myText),true); Test.assertEquals(wordSearch("prince",myText),true); Test.assertEquals(wordSearch("le prince",myText),false); }); });
I didn't want to diverge too far from the kata's creaters idea which is why I didn't move the text to become a parameter and randomly generate the test in turn also resulting in all solutions to become invalid because they use the global variable text.. but I'll try fix something up while not invalidating the old solutions :)
Hi, that was fast, but not quite was I was getting at.
The text is still the same as before, only now the test cases are randomly selected.
What I meant is that the text (sentence) should be randomly generated.
If you remove the 'const' keyword, and assign the global variable 'text' in the test fixture, then you can do this.
Use random numbers to select characters from a dictionary, building up 'words' of random lengths, building 'sentences' of random length, etc.
Any of those 'words' can be saved and inserted into the test cases.
Implemented the resolution to the issue myself :)
I've fixed that issue
Loading more items...