Ad
  • Custom User Avatar

    Hi guys!

    I propose 1 more test to infeer if input parameters were changed (this way we get a more direct exposed information):

    describe("Solution", function(){
    let moves = ['up', 'left', 'right', 'left', 'left'];
    let position = [0,0]
    it("shouldn't change the input parameters", function(){
    streetFighterSelection(fighters, position, moves);
    assert.deepEqual(fighters, [["Ryu", "E.Honda", "Blanka", "Guile", "Balrog", "Vega"],
    ["Ken", "Chun Li", "Zangief", "Dhalsim", "Sagat", "M.Bison"]]);
    assert.deepEqual(position, [0,0]);
    assert.deepEqual(moves, ['up', 'left', 'right', 'left', 'left']);
    });
    });

    [Sorry, don't now how to preserve code formatation]

  • Custom User Avatar

    Hi,

    I've replied afterwards explaning I've mutated 1 of the input parameters, after all.
    (This reply disapeared!)
    and marked the issue as resolved.

    I'm new here and just trying to help. ()
    I now understand that marking something as buggy is offensive! Sorry! Won't bother you again mmalkavian.

    You really should read this: https://en.wikipedia.org/wiki/Ad_hominem

  • Custom User Avatar

    Random test is the only test failing but results are equal to mine!
    I haven't mutated the parameters (as RahulTeammate points out).

    eg:
    ✘ expected [ Array(6) ] to deeply equal [ Array(6) ]