TDD with javascript