test driven development javascript