Ad
  • Custom User Avatar

    a bit late, but i think i fixed "this" issue. talking about uninformative test output, this is a game kata, so not everything should be straightforward ;] also i give a hint to search for a key, so in my opinion that should be enough.

  • Custom User Avatar

    Hi, I will take a deeper look into your comment when I have time ;]

  • Custom User Avatar

    We had a modal dialog implementation but took it out as it still needs work. I do have some tweaks queued for release that should fix the issue with local storage not working on history change. Thats going out in a larger update later this week.

  • Custom User Avatar

    It can be really nerve-racking when work gets lost. Sorry to hear it happened to you. We do have a save feature, as well as try to save all unsaved edits via the browser's local storage. Due to how the ajax history stuff works, sometimes when you accidentily swipe backwards and then forwards again, the local storage can sometimes be flakey and not load properly. That is an open issue that we intend on fixing. However if this ever happens again, try refreshing the page before making any further edits. This usually brings your code back.

    Also cmd + return is your friend. Its the shortcut for running the current editor's code. If the main editor is active then this will run the code + save it. You can also use cmd + ; which will also do a "save & attempt", and it works the same when either editor is active.

    While I'm talking about shortcuts. Also note that you can use cmd + i to toggle instructions/output tabs and cmd + u to toggle active code editors.

  • Custom User Avatar
  • Custom User Avatar

    Good catch - that shouldn't be there. We missed that before pushing it, we'll get it fixed.

  • Custom User Avatar

    We have our own layer on top of CodeMirror to encapsulate our configuration/customizations. Ideally I would turn this part into a proper CM add-on once I get some time. If you need the code for your own use let me know.

  • Default User Avatar

    @akoptsov

    Hi

    I have now 7 standard fixed tests to test at least each weekday once.
    I also added 10 tests which generate random dates to prevent hard-coded solutions.

    The output of failing tests are also now using behaviour driven syntax "WHEN...THEN..." detailing the values passed and what the expected and actual days were.

    You can see the tests in the solution section.
    As you suggested I think I covered the issues with hard-coded solutions but yet still be able to give as much details to failing tests as possible.

    Thanks again for the feedback.
    Feel free to let me know of anything else you might notice that could improve the quality of the Tests and/or the Kata.

  • Default User Avatar

    Ah, that's interesting, I never thought of that.
    Makes sense in this case.

    I can add some Math.random for day, month and year values, combine them and loop through a few tests.
    Not something I would do in a real life application test but I like the idea to prevent hard-coded solutions and give a warrior as much info as possible.

    I have to wait until I get home tonight to update this properly.

    Thanks a lot, great feedback :)

  • Default User Avatar

    I originally was going to add the full date into the output message that I tested against but at the same time did not want anyone just then hard-code the results into the function.

    i.e: If string === 'xyz' then return 'Wednesday'

    I couldn't figure out how to prevent those solutions while at the same time giving more information in the output.

    That is why I opted for 2 example tests added by default so the user can use them to verify and as a template to add more user unit tests.

    I guess I could add some with verbose outputs while leaving some with just the standard output.

    Would that be more helpful?

  • Custom User Avatar

    Thanks. This has been fixed. We also fixed the issue with how the CodeMirror editor handles tabbing. Tab and Shift+Tab should be working correctly now (we had to write our own implementation).

  • Default User Avatar

    Oops, I thought you all meant the hidden test cases. You're both right, of course. Thanks!

  • Custom User Avatar

    Right, and you've got it as 26 in the test cases. :-)

  • Default User Avatar

    I checked, but every calendar I've looked at for November 2009 shows the date as the 27th.

  • Custom User Avatar

    The description specifies it is defined for non-negative integers. I could add a test for that, but this Kata is already published but, unless it is an error I would say it is better not to change the tests. Read it like unspecified behavior.