Ad
  • Custom User Avatar

    I removed all tests where expected and actual values were switched. But there are still tests in the form

    let k = global.expected;
    assert.strictEqual(next(), k, "Modify expected variable");
    
  • Custom User Avatar

    Yes, there are also test cases in the form strictEqual(expected, next()).

  • Custom User Avatar

    Thanks for the response. What I noticed is that the test actually looks like this:

    assert.strictEqual(expected, next(), "No modify expected variable");
    

    If this is the case, it means that I need to return previous value of expected, not next, since expected was already executed, right?

    This is truly interesting kata, but if this is the case then the whole kata is a bit missleading.

    I will try to solve it either way!

  • Custom User Avatar

    The No modify expected variable test looks like this:

    let k = global.expected;
    assert.strictEqual(next(), k, "Modify expected variable");
    

    Hint: you need to do something outside of the function next in order to pass this test. (The initial solution has this line: // Hint: Initial code.)

  • Custom User Avatar

    Please post your current solution in a comment with the spoiler flag.

  • Custom User Avatar

    The description actually said enough, it's on you to be creative and try to figure out what is happening. In realaity you rarely have 100% information of the problem, but instead you get only small portion of it and need to figure out a solution ;)

  • Custom User Avatar

    I can't pass No modify expected variable test, even though right before the return I see in the logs the correct value!

    And I am not modifing the expected value so the error description makes no sense.

    Can I get a hint what might be wrong? I am pretty sure that my solution should work.

  • Custom User Avatar

    I agree that it is not a 5kyu. It had an average assessment of 4kyu but it was approved as a 5kyu and I have no idea why.

  • Custom User Avatar

    Really bad kata, you need tell people, what we need to do. This kata with almost 0 contructive description, really bad kata.

  • Custom User Avatar

    I didn't get it even after i saw solutions. Maybe its not 5kyu? Maybe i'm just stupid?

  • Custom User Avatar

    Updated

  • Custom User Avatar

    Test should be updated. See this guide.

  • Custom User Avatar

    The author updated the tests.

  • Custom User Avatar

    this shouldn't work

  • Custom User Avatar

    Ok, but I think that code isn't cheating and I use a for loop there, so maybe specify it better in the description?

  • Loading more items...