Ad
  • Custom User Avatar

    Great kata! The only minor issue I encountered was mis-casing of dateOfbirth property (proper camelCase would be dateOfBirth).

  • Custom User Avatar

    yes, I've removed all rounding hacks and all tests are passing now

  • Custom User Avatar

    My random tests keep failing because of some strange rounding issues:

    1. amounts in the raw object seem to be rounded to 1 decimal point - I could round the result in the same way, but it seems pointless and hacky
    2. time value doesn't match the test by a 0.0000000000001 - and I can't event hack this diff to pass tests (most of the runs, it's the expected result that is not rounded)

    I might guess it's because random tests can request a non-integer number of portions (amount % yield !== 0).
    Or am I missing anything in the algorithm?