Ad
  • Custom User Avatar

    Great kata to solve, very funny to figure out.

  • Custom User Avatar

    Funny kata and nice series, congratulations.

  • Custom User Avatar

    That () did the trick. Thanks to you both.

  • Custom User Avatar

    Yes this too, I did not mention this because I thought that the first thing to check would be the asynchronous invocation, and this binding is not really rerelevant in context of this specific question.

  • Custom User Avatar

    Mocha official documentation warns against passing arrow functions to it() / describe(), as they cannot access the this context. This is especially relevant for asynchronous tests.

  • Custom User Avatar

    I am not at my laptop so I cannot run your code atm, but one thing which immediately caught my eye is that you use asynchronous tests without awaiting them. CW runner does not account for asynchronous test functions, you have to make your test functions argumentless. _=>{...} is not correct, it should be ()=>{...}. Or maybe you can make Mocha await for your tests by doing done(_); at the end of each it.

    I cannot remember if having tests in Solution breaks things, but it might. If possible, add your own test cases to Example tests editor.

    I will be able to tell.more when i get to my laptop in the evening.

  • Custom User Avatar

    Sure, I have no vars, and put tests in the "Solution" box. But even moving these to "Example tests" box, produces this behavior. Here's a very simple snippet that already messes things up.

    function solve(clues, width, height) {
      // Finish this
    }
    
    const chai = require("chai");
    const assert = chai.assert;
    
    let CUSTOM_PERFORMANCE_TESTS_ENABLED = true;
    
    const doCustomPerformanceTests = _ => {
      if (CUSTOM_PERFORMANCE_TESTS_ENABLED) {
        describe("Performance tests", _ => {
          it("Event scheduling", _ => {
            assert.isTrue(true);
          });
        });
      } 
    }
    
    doCustomPerformanceTests();
    
  • Custom User Avatar

    Adding your own unit tests should not affect submission tests in any way, and the only thing which comes to my mind is that you do not add the tests in "Example tests" box, but you added them to the "Solution" box.

    Another possibility is that some unfortunately placed var or implicit global in your solution or in tests breaks things.

    If you'd show the code with your additional tests (and without spoilers), I could take a look.

  • Custom User Avatar

    Is this kata preventing custom unit tests in Javascript? If I add my own unit tests, none of the existing test cases run, neither in sample tests, nor in submission tests :/

  • Custom User Avatar

    Tough. Learned a lot.

  • Custom User Avatar

    Java:

    • Missing fixed tests

    • JUnit5 should be used

  • Custom User Avatar

    Wish I had the vision

  • Custom User Avatar

    The right answer is 19. Description says that the 1st century is 1 to 100, so the 19th century is 1801 to 1900.

  • Custom User Avatar

    Man, that's a wonderfull kata!
    About half an hour of a brainstorming and I've finally figured out how LZ78 works!!
    Thanks, man! That's really not very hard but eventually you stand one more step closer to becoming a guru

  • Custom User Avatar

    Enabled in this fork

  • Loading more items...