Ad
  • Custom User Avatar

    Got it! Thank you so much for your help.

  • Custom User Avatar

    because undefined is passed into the parameter _id

  • Custom User Avatar

    Thanks for your reply.
    The test is expecting undefined... I am probably missing something, but I think that if func is function (_id) { return _id; } and params is { _id: 'test' }, then defaultArguments(function (_id) { return _id; },{_id:"test"}) should equal test?

  • Custom User Avatar

    this is how babel compiles the code and is not an issue.
    You shouldn't have to create a special case to get around this..

  • Custom User Avatar

    this is how babel compiles the code.

  • Custom User Avatar

    I am blocked with the exact same problem (reported today)... I am wondering if you are still blocked?

  • Custom User Avatar

    I have the exact same problem as gbedardsice (see below): I think test #29 is wrong. The arguments for that test are (when I add some logs):

    >>>func: function (_id) { return _id; }
    >>>params: { _id: 'test' }
    

    The assertion failure is: defaultArguments(id,{id:"test"})(undefined) - Expected: undefined, instead got: test

    So it seems that "something" is replacing {id: 'test'} by {_id: test}?

    Note: I tried with node 6 and node 0.10: same issue.

  • Custom User Avatar

    I think this is to test that You should be able to call defaultArguments repeatedly to change the defaults. (from kata detailed instruction).