TDD javascript