Learning TDD javascript