Ad
  • Custom User Avatar
  • Custom User Avatar

    Language?

  • Custom User Avatar

    Description seems to be already fixed

  • Custom User Avatar

    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.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    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.

  • Custom User Avatar

    Should implement some random tests. I am seeing hard-coded arrays in the solutions here.

  • Custom User Avatar

    I believe I've fixed this issue, if you could please check and then mark this issue as resolved, thanks! :)

  • Custom User Avatar
  • Custom User Avatar

    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 return false, which should include undefined, but the tests require otherwise...

  • Custom User Avatar

    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); }); });

  • Custom User Avatar

    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 :)

  • Custom User Avatar

    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.

  • Custom User Avatar

    Implemented the resolution to the issue myself :)

  • Custom User Avatar

    I've fixed that issue

  • Loading more items...