6 kyu

Visa application centre

Description
Loading description...
Fundamentals
  • Please sign in or sign up to leave a comment.
  • FArekkusu Avatar

    Tests should properly compare actual/expected values instead of iterating over the indices of expected and checking that actual[i] === expected[i] which simply breaks if the filter is incorrect.

  • FArekkusu Avatar

    Tests only check the values stored in the visaExpiration and insuranceId fields, not that they come together with the original data.

  • Blind4Basics Avatar

    Hi,

    • no sample tests

    • the inclusiveness of the expiration date (90 days) isn't specified

    • ... "wut!?":

      /home/codewarrior/index.js:5
        const M=0
              ^
      
      SyntaxError: Identifier 'M' has already been declared
      

    => freeze it, but don't assign it.

  • dagolinuxoid Avatar

    This comment has been hidden.

  • dagolinuxoid Avatar

    This comment has been hidden.

  • tachyonlabs Avatar

    Your tests need to use passport expiration dates that are assigned relative to today's date rather than fixed -- with the third test in both the example and full tests I'm getting the error message

    ✘ Two candidates should have passed. - Expected: 2, instead got: 0 
    

    but when I have my code console.log the passport expiration dates --

    22.04.2017
    31.03.2017
    07.12.2016
    22.05.2017
    03.12.2016
    

    all of them are less than 90 days from now.

    • St3f4n Avatar

      Wow, strange that this went unnoticed till now. There are random tests relative to today already but I guess I'll have to delete all the example tests. I'll take a look later today, thx for noticing :)

    • tachyonlabs Avatar

      I guess no one has done this one for a while.

    • St3f4n Avatar

      Ok I think that's it, you can try it out if you like. Just that now there are no example tests :(

    • tachyonlabs Avatar

      It worked for me now, cool! But the same example tests are still there. Maybe you should just edit the passport expiration dates for the people you want accepted in the example tests to be many years in the future.

      Issue marked resolved by tachyonlabs 8 years ago
    • St3f4n Avatar

      I think you have to reset the kata (the button on the left side of example tests button), to see the changes. When I try the kata again I see only a comment that I left in the example test section.

    • tachyonlabs Avatar

      i guess that makes sense in case people had been modifying the example tests for their own debugging use. But yeah, if I click TRAIN AGAIN I see what you describe.

  • smile67 Avatar

    Hi, your "visaExpiration" tests don't work. Haven't looked for details, but my code works without setting/using .visaExpiration;-)...

    • St3f4n Avatar

      Hey smile, can you try it out now? I've been having a lot of timeout issues and had a hard time making changes. But you spotted an important error which I think should be fine now.

    • smile67 Avatar

      Hi Stefan, same to me (timeouts), but your error is fixed now, don't know why my solution is still valid (can't submit it again), but perhaps because of codewars problems. My second solution (shorter one) should work and it was no problem to submit too;-). So this point seems ok now - good work;-)! By the way good kata too:-)!

    • St3f4n Avatar

      In one place objects were passed by reference so that messed everything up. I'm glad you liked it :)

  • !untrue Avatar

    The desired return type could be a lot more clear... took me a while to grasp what you wanted back.

    • St3f4n Avatar

      What exactly did you have in mind?

    • !untrue Avatar

      Nothing much, maybe a section called "Function should return" that states you want the same array back, with the inelligable people removed, and the elligable objects modified. It's a minor nit-pick, and I don't mean to raise it as anything important... it'd just help to digest the problem faster.

      Suggestion marked resolved by !untrue 9 years ago
    • St3f4n Avatar

      I've tried modifying the description but the kata editor is really buggy, server keeps timing out. So tomorrow I'll add a sentence like this
      In other words the function should return the same array back, with the inelligable people removed, and the elligable objects modified. Thx for your time.

  • ZozoFouchtra Avatar

    This comment has been hidden.