Ad
  • Custom User Avatar

    This kata doesn't satisfy basic kata requirements: spec is still unclear, test code is riddled with basic technical errors, only 7 fixed tests, and no random tests.

    Kata author really should have a look at the kata authoring guideline.

  • Custom User Avatar

    Expected and actual values are flipped in the test assertion messages:

    expected 'Idle\nInvalid floor number: 6\n' to equal ''
    

    chai.config.truncateThreshold = 0; is also missing in test code, which truncates inputs in assertion messages:

    expected 'Idle\nPressed button in elevator to g…' to equal 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx…'
    
  • Custom User Avatar

    Please describe elevator behavior more eplicitly. For example:

    • Stopping to open doors takes 1 step
    • After calling elevator, the elevator starts moving immediately (after 0 steps)
    • The order in which events should be logged each step (button presses before moving, ...)

    This way you don't have to resort to the test cases to find this out.

  • Custom User Avatar

    In the first example result:

    Idle
    Pressed button in elevator to go UP to 3 floor
    Going up: 0.5
    Going up: 1
    Pressed button DOWN on 2 floor (then to -1)
    Going up: 1.5
    Going up: 2
    ...
    

    Why is the Pressed button DOWN on 2 floor (then to -1) written after 2 steps? Is it because it reads the null as a move and one move = 2 steps / 1 floor?

  • Custom User Avatar

    should add character limit (2000 should be fine) to guard against hardcoding.

  • Custom User Avatar

    Is there an actual need for the steps parameter? The result always terminates either way.

  • Custom User Avatar

    For n <= 0 return empty string. But solutions that only check for n == 0 can pass easily in JS && Ruby at least